Skip to content

Instantly share code, notes, and snippets.

@subbuss
Created August 6, 2009 20:33
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 subbuss/163551 to your computer and use it in GitHub Desktop.
Save subbuss/163551 to your computer and use it in GitHub Desktop.
[subbu@earth ~] irb
irb(main):001:0> 1.to_ary
NoMethodError: undefined method `to_ary' for 1:Fixnum
from (irb):1
irb(main):002:0> a,b,c=1; p a,b,c
1
nil
nil
=> nil
irb(main):003:0> class Fixnum
irb(main):004:1> def to_ary; []; end
irb(main):005:1> end
=> nil
irb(main):006:0> a,b,c=1; p a,b,c
nil
nil
nil
=> nil
irb(main):007:0> [subbu@earth ~] ast -e "a,b,c,=1"
RootNode 0
NewlineNode 0
MultipleAsgnNode 0
ArrayNode 0
LocalAsgnNode:a 0
LocalAsgnNode:b 0
LocalAsgnNode:c 0
ToAryNode 0
FixnumNode 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment