ruby-changes:15372
From: mame <ko1@a...>
Date: Fri, 9 Apr 2010 01:16:52 +0900 (JST)
Subject: [ruby-changes:15372] Ruby:r27263 (trunk): * lib/irb/completion.rb (CompletionProc): calling the method "methods"
mame 2010-04-09 01:16:17 +0900 (Fri, 09 Apr 2010) New Revision: 27263 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27263 Log: * lib/irb/completion.rb (CompletionProc): calling the method "methods" may raise an exception. [ruby-core:28366] Modified files: trunk/ChangeLog trunk/lib/irb/completion.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27262) +++ ChangeLog (revision 27263) @@ -1,3 +1,8 @@ +Fri Apr 9 01:12:07 2010 Yusuke Endoh <mame@t...> + + * lib/irb/completion.rb (CompletionProc): calling the method "methods" + may raise an exception. [ruby-core:28366] + Thu Apr 8 14:33:24 2010 URABE Shyouhei <shyouhei@r...> * configure.in: --disable-install-doc should prohibit doxygen. Index: lib/irb/completion.rb =================================================================== --- lib/irb/completion.rb (revision 27262) +++ lib/irb/completion.rb (revision 27263) @@ -138,10 +138,7 @@ lv = eval("local_variables", bind).collect{|m| m.to_s} cv = eval("self.class.constants", bind).collect{|m| m.to_s} - if (gv | lv | cv).include?(receiver) - # foo.func and foo is local var. - candidates = eval("#{receiver}.methods", bind).collect{|m| m.to_s} - elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver + if (gv | lv | cv).include?(receiver) || /^[A-Z]/ =~ receiver and /\./ !~ receiver # Foo::Bar.func begin candidates = eval("#{receiver}.methods", bind).collect{|m| m.to_s} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/