ruby-changes:20586
From: nobu <ko1@a...>
Date: Sat, 23 Jul 2011 12:13:06 +0900 (JST)
Subject: [ruby-changes:20586] nobu:r32634 (trunk): * parse.y (rb_check_id): conversion condition was inverse.
nobu 2011-07-23 12:12:28 +0900 (Sat, 23 Jul 2011) New Revision: 32634 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32634 Log: * parse.y (rb_check_id): conversion condition was inverse. [Bug #5084] Modified files: trunk/ChangeLog trunk/parse.y trunk/test/ruby/test_module.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32633) +++ ChangeLog (revision 32634) @@ -1,3 +1,8 @@ +Sat Jul 23 12:12:25 2011 Nobuyoshi Nakada <nobu@r...> + + * parse.y (rb_check_id): conversion condition was inverse. + [Bug #5084] + Fri Jul 22 21:46:54 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround Index: parse.y =================================================================== --- parse.y (revision 32633) +++ parse.y (revision 32634) @@ -10111,7 +10111,7 @@ if (SYMBOL_P(name)) { return SYM2ID(name); } - else if (RB_TYPE_P(name, T_STRING)) { + else if (!RB_TYPE_P(name, T_STRING)) { tmp = rb_check_string_type(name); if (NIL_P(tmp)) { tmp = rb_inspect(name); Index: test/ruby/test_module.rb =================================================================== --- test/ruby/test_module.rb (revision 32633) +++ test/ruby/test_module.rb (revision 32634) @@ -498,6 +498,8 @@ name = "gadzooks" assert !Symbol.all_symbols.any? {|sym| sym.to_s == name} assert_raise(NameError) { c1.const_defined?(name) } + bug5084 = '[ruby-dev:44200]' + assert_raise(TypeError, bug5084) { c1.const_defined?(1) } end def test_const_get_no_inherited -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/