[#47386] [Backport92 - Backport #6958][Open] buggy BigDecimal#integer? — "adrianomitre (Adriano Mitre)" <adriano.mitre@...>
7 messages
2012/09/01
[#47409] [ruby-trunk - Feature #6973][Open] Add an #integral? method to Numeric to test for whole-number values — "regularfry (Alex Young)" <alex@...>
12 messages
2012/09/03
[#47444] [ruby-trunk - Bug #6986][Open] Inconsistent result of BigDecimal#power — "phasis68 (Heesob Park)" <phasis@...>
7 messages
2012/09/06
[#47453] [ruby-trunk - Bug #6994][Open] yield plus splat unwraps too much — "headius (Charles Nutter)" <headius@...>
8 messages
2012/09/07
[#47460] [ruby-trunk - Bug #6997][Open] Improve documentation for OptionParser — "eike.rb (Eike Dierks)" <eike@...>
7 messages
2012/09/08
[#47465] [ruby-trunk - Feature #7003][Assigned] Please decide. MVM to be with 2.0? — "shyouhei (Shyouhei Urabe)" <shyouhei@...>
3 messages
2012/09/10
[#47523] [ruby-trunk - Feature #7022][Open] add event hook for garbage collection — "rogerdpack (Roger Pack)" <rogerpack2005@...>
7 messages
2012/09/14
[#47531] [ruby-trunk - Feature #7022] add event hook for garbage collection
— "rogerdpack (Roger Pack)" <rogerpack2005@...>
2012/09/14
[#47540] autoload & require — Xavier Noria <fxn@...>
Hi,
4 messages
2012/09/15
[#47562] feature request: thread pool class — Roger Pack <rogerdpack2@...>
It has always seemed a bit odd to me that Ruby's sdlib doesn't have some kind of
4 messages
2012/09/17
[#47638] [ruby-trunk - Bug #7046][Open] ERB#run and ERB#result are not safe for concurrent use — "headius (Charles Nutter)" <headius@...>
11 messages
2012/09/21
[#47653] [ruby-trunk - Bug #7050][Open] encoding of String#unpack for 'H', 'h', 'B' and 'b' — "Eregon (Benoit Daloze)" <redmine@...>
6 messages
2012/09/22
[#47655] [ruby-trunk - Feature #7051][Open] Extend caller_locations API to include klass and bindings. Allow caller_locations as a method hanging off Thread. — "sam.saffron (Sam Saffron)" <sam.saffron@...>
13 messages
2012/09/23
[#47709] [ruby-trunk - Bug #7076][Open] TestUnicodeEscape#test_basic failure on Windows — "h.shirosaki (Hiroshi Shirosaki)" <h.shirosaki@...>
4 messages
2012/09/27
[#47719] [ruby-trunk - Bug #7082][Open] Process.kill 0 in windows can return spurious success — "rogerdpack (Roger Pack)" <rogerpack2005@...>
6 messages
2012/09/28
[#47730] [ruby-trunk - Bug #7085][Open] Subversion → GitHub gateway stops. — "shyouhei (Shyouhei Urabe)" <shyouhei@...>
27 messages
2012/09/29
[#47731] [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— "shyouhei (Shyouhei Urabe)" <shyouhei@...>
2012/09/29
[#47743] Re: [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— Evan Phoenix <evan@...>
2012/09/29
Hello shyouhei, =20
[#47746] Re: [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— Urabe Shyouhei <shyouhei@...>
2012/09/30
On 09/30/2012 02:33 AM, Evan Phoenix wrote:
[#48020] [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— "shyouhei (Shyouhei Urabe)" <shyouhei@...>
2012/10/16
[#48953] [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— "shyouhei (Shyouhei Urabe)" <shyouhei@...>
2012/11/05
[#49123] Re: [ruby-trunk - Bug #7085] Subversion → GitHub gateway stops.
— Evan Phoenix <evan@...>
2012/11/08
So sorry for the continual delay. I'm setting this up right now but it ap=
[#47735] [ruby-trunk - Bug #7087][Open] ::ConditionVariable#wait does not work with Monitor because Monitor#sleep does not exist — "rklemme (Robert Klemme)" <shortcutter@...>
10 messages
2012/09/29
[ruby-core:47671] [ruby-trunk - Bug #7045][Closed] DelegateClass array subtraction
From:
"marcandre (Marc-Andre Lafortune)" <ruby-core@...>
Date:
2012-09-24 01:30:46 UTC
List:
ruby-core #47671
Issue #7045 has been updated by marcandre (Marc-Andre Lafortune).
Status changed from Open to Closed
> I'm not sure that explains it. The first and third tests pass
Sorry, I didn't focus on the other tests. So the reason the first and third test pass is that Hash lookup uses `hash` and `eql?`, except that if the objects are the same (same object_id), it assumes they are `eql?`. I'm assuming this is for performance reasons, since it should be true for almost all objects. It isn't for NaN, though, so this can give strange results:
n = 0.0/0
n.eql?(n) # => false
h = {n => :nan}
h[n] # => :nan (exact same object)
h[0.0/0] # => nil (since another float was constructed)
The first test passes because a hash is built with `obj` as the key, and afterwards lookup succeeds for `obj` as it is the exact same object.
The last test passes for the same reason, because the key and the lookup are done on the exact same array `[obj]`.
The second test fails because the key and the lookup are not the same object (different `object_id`), so `eql?` is called and `[obj].eql? [obj]` returns false.
> and all of them used to pass in 1.8.
In 1.8, `eql?` was not delegated at all. So you had `obj.eql?(obj) # => true`, but on the other hand `SimpleDelegator.new(42).eql?(42) # => false`.
> This seems like a duplicate of http://bugs.ruby-lang.org/issues/6408. Not sure how to close this, but it can be closed.
Indeed, if 6408 was fixed, we'd have `obj.eql? obj` return true and all your tests would pass. I'll close this then.
----------------------------------------
Bug #7045: DelegateClass array subtraction
https://bugs.ruby-lang.org/issues/7045#change-29693
Author: benmoss (Ben Moss)
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-09-21) [x86_64-darwin11.4.0]
When I have an array that contains an array that contains a single instance of a class that inherits from DelegateClass, and I subtract from that array another array containing another array containing the same nested object, Ruby does not return an empty array. I've attached a test file that should replicate the one failing scenario, as well as some complimentary scenarios that do work as I had expected.
--
http://bugs.ruby-lang.org/