diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_object.rb | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Jul 22 20:24:38 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> + + * test/ruby/test_object.rb (TestObject#test_respond_to_missing): + 2nd argument of respond_to_missing? is not optional. + Fri Jul 22 19:05:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 63c1d32bef..2935885431 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -336,14 +336,14 @@ class TestObject < Test::Unit::TestCase def test_respond_to_missing c = Class.new do - def respond_to_missing?(id, priv=false) + def respond_to_missing?(id, priv) if id == :foobar true else false end end - def method_missing(id,*args) + def method_missing(id, *args) if id == :foobar return [:foo, *args] else |