Bug #3617
closed
respond_to?(:gem) is false in 1.9.2-rc2
Added by sunaku (Suraj Kurapati) over 14 years ago.
Updated over 13 years ago.
Description
=begin
Please compare the new behavior:
ruby 1.9.2dev (2010-07-11 revision 28618) [i686-linux]¶
respond_to? :gem
=> false
method :gem
=> #<Method: Object(Kernel)#gem>
Against the old behavior:
ruby 1.9.1p429 (2010-07-02 revision 28523) [i686-linux]¶
respond_to? :gem
=> true
method :gem
=> #<Method: Object(Kernel)#gem>
I think the new behavior is strange. How
can #respond_to? fail when #method succeeds?
Thanks for your consideration.
=end
=begin
Hi,
At Mon, 26 Jul 2010 16:07:12 +0900,
Suraj Kurapati wrote in [ruby-core:31485]:
ruby 1.9.2dev (2010-07-11 revision 28618) [i686-linux]¶
respond_to? :gem
=> false
method :gem
=> #<Method: Object(Kernel)#gem>
$ ./ruby -v -e 'p respond_to?(:gem, true)'
ruby 1.9.2dev (2010-07-24 revision 28749) [i386-darwin9.8.0]
true
I think the new behavior is strange. How
can #respond_to? fail when #method succeeds?
Kernel#respond_to? returns false if the method is private.
--
Nobu Nakada
=end
=begin
On 1.9.1, Kernel#gem is public, but on 1.9.2 it is private.
But why it is changed.
=end
=begin
On Mon, Jul 26, 2010 at 06:50:06PM +0900, Yui NARUSE wrote:
Issue #3617 has been updated by Yui NARUSE.
On 1.9.1, Kernel#gem is public, but on 1.9.2 it is private.
But why it is changed.
Kernel#gem is private in rubygems. gem_prelude made it public. I
believe it was fixed in gem_prelude to match the rubygems API.
Kernel#gem is also private in 1.8.7.
Check r26127 and [ruby-dev:39838]
--
Aaron Patterson
http://tenderlovemaking.com/
Attachment: (unnamed)
=end
=begin
Thank you for explaining. I agree that this is not a bug.
=end
- Status changed from Open to Rejected
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0