public
Last active

  • Download Gist
args.rb
Ruby
1 2 3 4 5 6 7
def []=(*args)
p args
end
 
a = ['a']
 
self[1,*a,2] = 2
crashreport.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Rubinius Crash Report #rbxcrashreport
 
[[Exception]]
A toplevel exception occurred
Error trying to compile /Users/james/rubies/main/Languages/Ruby/Tests/Experiments/19/args.rb (Rubinius::CompileError)
 
Backtrace:
Rubinius::Compiler.compiler_error at /Users/james/.rvm/rubies/rbx-head/runtime
/19/compiler/compiler.rbc:13
Rubinius::Compiler.compile at /Users/james/.rvm/rubies/rbx-head/runtime
/19/compiler/compiler.rbc:88
Rubinius::CodeLoader#compile_file at kernel/delta/codeloader.rb:166
Rubinius::CodeLoader#load_file at kernel/delta/codeloader.rb:138
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:63
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:109
Rubinius::Loader#script at kernel/loader.rb:630
Rubinius::Loader#main at kernel/loader.rb:834
 
Caused by: undefined method `size' on an instance of Rubinius::AST::PushArgs. (NoMethodError)
 
Backtrace:
 Kernel(Rubinius::AST::PushArgs)#size (method_missing) at kernel/delta
/kernel.rb:81
Rubinius::AST::PushActualArguments#size at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/sends.rbc:295
Rubinius::AST::ElementAssignment#bytecode at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/sends.rbc:239
{ } in Rubinius::AST::Block#bytecode at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/definitions.rbc:96
 { } in Enumerable(Array)#each_with_index at kernel/common/enumerable19.rb:447
 Array#each at kernel/bootstrap/array.rb:68
 Enumerable(Array)#each_with_index at kernel/common/enumerable19.rb:446
Rubinius::AST::Block#bytecode at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/definitions.rbc:94
{ } in Rubinius::AST::Script#bytecode at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/definitions.rbc:1073
Rubinius::AST::Container(Rubinius::AST::Script)#container_bytecode at \
/Users/james/.rvm/rubies/rbx-head/runtime/19/compiler/ast/definitions.rbc:956
Rubinius::AST::Script#bytecode at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/ast
/definitions.rbc:1072
Rubinius::Compiler::Generator#run at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/stages.rbc:153
Rubinius::Compiler::Stage(Rubinius::Compiler::FileParser)#run_next at \
/Users/james/.rvm/rubies/rbx-head/runtime/19/compiler/stages.rbc:53
Rubinius::Compiler::Parser(Rubinius::Compiler::FileParser)#run at \
/Users/james/.rvm/rubies/rbx-head/runtime/19/compiler/stages.rbc:220
Rubinius::Compiler#run at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/compiler.rbc:370
Rubinius::Compiler.compile at /Users/james/.rvm/rubies/rbx-head
/runtime/19/compiler/compiler.rbc:84
 Rubinius::CodeLoader#compile_file at kernel/delta/codeloader.rb:166
 Rubinius::CodeLoader#load_file at kernel/delta/codeloader.rb:138
 Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:63
 Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:109
 Rubinius::Loader#script at kernel/loader.rb:630
 Rubinius::Loader#main at kernel/loader.rb:834
 
[[Version]]
rubinius 2.0.0dev (1.9.3 f4645d6c yyyy-mm-dd JI) [x86_64-apple-darwin11.2.0]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.