Skip to content

Instantly share code, notes, and snippets.

@DNNX DNNX/gist:4283465
Created Dec 14, 2012

Embed
What would you like to do?
Different behaviour of default initializer in Ruby 1.9.2 and Ruby 1.9.3
➜ ~ rvm use 1.9.2 && ruby -e 'class A; end; puts A.new(1)'
Using /Users/user/.rvm/gems/ruby-1.9.2-p320
#<A:0x007fcdc204fac8>
➜ ~ rvm use 1.9.3 && ruby -e 'class A; end; puts A.new(1)'
Using /Users/user/.rvm/gems/ruby-1.9.3-p327
-e:1:in `initialize': wrong number of arguments(1 for 0) (ArgumentError)
from -e:1:in `new'
from -e:1:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.