Skip to content

Instantly share code, notes, and snippets.

@paul
Created July 29, 2008 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paul/3185 to your computer and use it in GitHub Desktop.
Save paul/3185 to your computer and use it in GitHub Desktop.
% /usr/local/bin/rbx test.rb
A syntax error has occured:
/usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib/lazy_array.rb:24: syntax error, unexpected ',', expecting '='
near line /usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib/lazy_array.rb:24, column 28
Code:
@array.total=(*args, &block)
^
Backtrace:
String#to_sexp at kernel/core/string.rb:2225
Compiler.compile_string at /usr/local/lib/rubinius/0.9/compiler/compiler.rb:26
Compile.compile_string at kernel/core/compile.rb:70
Module(Class)#class_eval (module_eval) at kernel/core/eval.rb:169
LazyArray.__class_init__ {} at /usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib/lazy_array.rb:22
Array#each at kernel/core/array.rb:572
LazyArray.__class_init__ (LazyArray) at /usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib/lazy_array.rb:21
Object#__script__ at /usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib/lazy_array.rb:1
CompiledMethod#as_script at kernel/core/compiled_method.rb:407
Compile.single_load at kernel/core/compile.rb:253
Compile.unified_load at kernel/core/compile.rb:120
Kernel(Object)#gem_original_require (require) at kernel/core/compile.rb:459
Kernel(Object)#require at /usr/local/lib/rubinius/0.9/rubygems/custom_require.rb:34
Object#__script__ at /usr/local/lib/rubinius/gems/1.8/gems/extlib-0.9.4/lib/extlib.rb:12
CompiledMethod#as_script at kernel/core/compiled_method.rb:407
Compile.single_load at kernel/core/compile.rb:253
Compile.unified_load {} at kernel/core/compile.rb:160
Array#each at kernel/core/array.rb:572
Compile.unified_load at kernel/core/compile.rb:127
Kernel(Object)#gem_original_require (require) at kernel/core/compile.rb:459
Kernel(Object)#require at /usr/local/lib/rubinius/0.9/rubygems/custom_require.rb:34
Object#__script__ at /usr/local/lib/rubinius/gems/1.8/gems/dm-core-0.9.4/lib/dm-core.rb:24
CompiledMethod#as_script at kernel/core/compiled_method.rb:407
Compile.single_load at kernel/core/compile.rb:253
Compile.unified_load {} at kernel/core/compile.rb:160
Array#each at kernel/core/array.rb:572
Compile.unified_load at kernel/core/compile.rb:127
Kernel(Object)#gem_original_require (require) at kernel/core/compile.rb:459
Kernel(Object)#require at /usr/local/lib/rubinius/0.9/rubygems/custom_require.rb:32
Object#__script__ at test.rb:2
CompiledMethod#as_script at kernel/core/compiled_method.rb:407
Compile.single_load at kernel/core/compile.rb:253
Compile.load_from_extension at kernel/core/compile.rb:326
Object#__script__ at kernel/loader.rb:277
% irb
irb(main):001:0> class Foo
irb(main):002:1> def bar=(*args, &block)
irb(main):003:2> end
irb(main):004:1> end
=> nil
irb(main):005:0> Foo.new.bar=(1,2,3)
SyntaxError: compile error
(irb):5: syntax error, unexpected ',', expecting ')'
Foo.new.bar=(1,2,3)
^
from (irb):5
% /usr/local/bin/rbx irb
class irb(main):001:0> class Foo
irb(main):002:1> def bar=(*args, &block)
irb(main):003:2> end
irb(main):004:1> end
=> #<CompiledMethod:0x5c1 name=bar= file=(irb)>
irb(main):005:0> Foo.new.bar=(1, 2, 3)
SyntaxError: (irb):5: syntax error, unexpected ',', expecting ')'
from String#to_sexp at kernel/core/string.rb:2225
from Compiler.compile_string at /usr/local/lib/rubinius/0.9/compiler/compiler.rb:26
from Compile.compile_string at kernel/core/compile.rb:70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment