[#74190] [Ruby trunk Feature#12134] Comparison between `true` and `false` — duerst@...
SXNzdWUgIzEyMTM0IGhhcyBiZWVuIHVwZGF0ZWQgYnkgTWFydGluIETDvHJzdC4KCgpUc3V5b3No
3 messages
2016/03/07
[#74269] Type systems for Ruby — Rob Blanco <ml@...>
Dear ruby-core,
5 messages
2016/03/10
[#74395] [Ruby trunk Feature#12142] Hash tables with open addressing — shyouhei@...
Issue #12142 has been updated by Shyouhei Urabe.
3 messages
2016/03/17
[ruby-core:74274] [Ruby trunk Bug#12164] Binding UnboundMethod to BasicObject
From:
nobu@...
Date:
2016-03-11 00:42:12 UTC
List:
ruby-core #74274
Issue #12164 has been updated by Nobuyoshi Nakada. "Yes" was to > Probably it is somehow related to https://bugs.ruby-lang.org/issues/11278 I guess it's a bug-fix, but maybe an improvement. Subtle. ---------------------------------------- Bug #12164: Binding UnboundMethod to BasicObject https://bugs.ruby-lang.org/issues/12164#change-57400 * Author: Nikita Shilnikov * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- I tried to bind method from Object to BasicObject and I suddenly succeeded. For example: ``` $ irb 2.3.0 :001 > BasicObject.send :define_method, :methods, Object.instance_method(:methods) => :methods 2.3.0 :002 > BasicObject.new.methods => [:!, :==, :!=, :__send__, :equal?, :methods, :instance_eval, :instance_exec, :__id__] 2.3.0 :003 > ``` In earlier ruby versions such code would raise an exception: ``` $ irb 2.2.4 :001 > BasicObject.send :define_method, :methods, Object.instance_method(:methods) TypeError: bind argument must be a subclass of Object from (irb):1:in `define_method' from (irb):1 from /Users/gordon/.rvm/rubies/ruby-2.2.4/bin/irb:11:in `<main>' 2.2.4 :002 > ``` Is it a bug or a feature? Probably it is somehow related to https://bugs.ruby-lang.org/issues/11278 -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>