[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60873] [ruby-trunk - Bug #8817] Method#owner on prepended classes is an instance rather than Class/Method
From:
nagachika00@...
Date:
2014-02-19 17:02:21 UTC
List:
ruby-core #60873
Issue #8817 has been updated by Tomoyuki Chikanaga.
Backport changed from 1.9.3: DONTNEED, 2.0.0: REQUIRED to 1.9.3: DONTNEED, 2.0.0: DONE
sorry for my late response. r44175 and r44179 were already backported to ruby_2_0_0. see #7993
----------------------------------------
Bug #8817: Method#owner on prepended classes is an instance rather than Class/Method
https://bugs.ruby-lang.org/issues/8817#change-45284
* Author: Bradley Schaefer
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
* Backport: 1.9.3: DONTNEED, 2.0.0: DONE
----------------------------------------
rdoc indicates that Method#owner will return a class or module that defines a method. http://www.ruby-doc.org/core-2.0/Method.html#method-i-owner
For classes that have prepended modules, the owner is actually an instance.
Example code:
module Mod; end
class Foo
prepend Mod
def foo; 'foo'; end
end
owner = Foo.instance_method(:foo).owner
puts "Method#owner on a prepended class instance_method: #{owner.inspect}" #=> #<Foo:0x007fd34dfd3ea0>
puts "Class?: #{owner.is_a? Class}" #=> false
puts "Module?: #{owner.is_a? Module}" #=> false
This had the effect of breaking stubbing in rspec (https://github.com/rspec/rspec-mocks/pull/385) , though a workaround is that the expected Class/Module can be retrieved by asking for the returned object's class.
--
http://bugs.ruby-lang.org/