* test/ruby/test_object.rb (TestObject#test_respond_to_missing):
2nd argument of respond_to_missing? is not optional. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0060732f1
commit
b8a1e15ef1
@ -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>
|
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
|
* parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
|
||||||
|
@ -336,14 +336,14 @@ class TestObject < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_respond_to_missing
|
def test_respond_to_missing
|
||||||
c = Class.new do
|
c = Class.new do
|
||||||
def respond_to_missing?(id, priv=false)
|
def respond_to_missing?(id, priv)
|
||||||
if id == :foobar
|
if id == :foobar
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def method_missing(id,*args)
|
def method_missing(id, *args)
|
||||||
if id == :foobar
|
if id == :foobar
|
||||||
return [:foo, *args]
|
return [:foo, *args]
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user