I am still surprised by this behavior change from 2.2.3 to 2.3.0 (and also present in 2.3.1 and 2.4.0):
$ ./ruby -e "puts RUBY_DESCRIPTION ; rand(BasicObject.new)"
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
-e:1:in `rand': undefined method `begin' for #<BasicObject:0x007fe0be4cb548> (NoMethodError)
from -e:1:in `<main>'
In 2.2.3 you get this, which I'd expect: $ ./ruby -e "puts RUBY_DESCRIPTION ; rand(BasicObject.new)"
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
-e:1:in `rand': undefined method `respond_to?' for #<BasicObject:0x007fa2d719bf78> (NoMethodError)
from -e:1:in `<main>'
It's as if rb_obj_respond_to changed... I don't understand it.