Skip to content

Instantly share code, notes, and snippets.

@DuoSRX
Created October 14, 2011 23:21
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 DuoSRX/1288665 to your computer and use it in GitHub Desktop.
Save DuoSRX/1288665 to your computer and use it in GitHub Desktop.
# 1.8
> 1.to_a
[1]
> 1.respond_to?(:to_a)
true
> a,b = 10
[10]
> a
[10]
> b
nil
# 1.9
> 1.to_a
NoMethodError: undefined method 'to_a' for 1:Fixnum
> 1.respond_to?(:to_a)
false
> a,b = 10
10
> a
10
> b
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment