Actions
Bug #12920
closedStrange NoMethodError in Time.now
Bug #12920:
Strange NoMethodError in Time.now
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-11-10 trunk 56692) [x86_64-darwin15]
Description
I got a strange NoMethodError in Time.now.
Updated by akr (Akira Tanaka) almost 10 years ago
The problem is not reproduced with ruby-2.4.0-preview2.
The problem is reproduced with ruby-2.4.0-preview3.
It seems something changed between ruby-2.4.0-preview2 and ruby-2.4.0-preview3.
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Status changed from Open to Closed
Applied in changeset r56694.
vm_eval.c: fix refined method when prepended
- vm_eval.c (vm_call0_body): refined module should not be skipped
as prepended. [ruby-core:78073] [Bug #12920]
Updated by kyanagi (Kouhei Yanagita) almost 10 years ago
Updated by usa (Usaku NAKAMURA) almost 10 years ago
- Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) almost 10 years ago
OMG I've confirmed with the script in the description (prepend and using with Integer) and it cannot reproduce NoMethodError on 2.3.2. But it's because Time.now doesn't use Integer#+ but Fixnum#+.
I've confirmed https://bugs.ruby-lang.org/issues/12920#note-3 was reproducible.
I'm going to backport this and try to understand the impact of this issue.
Updated by usa (Usaku NAKAMURA) almost 10 years ago
- Related to Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public added
Updated by nagachika (Tomoyuki Chikanaga) almost 10 years ago
- Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED to 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: DONE
ruby_2_3 r56816 merged revision(s) 56694,56698.
Actions