[#69084] [Ruby trunk - Feature #11124] [Open] [PATCH] lib/*: use monotonic clock for timeouts — normalperson@...
Issue #11124 has been reported by Eric Wong.
5 messages
2015/05/06
[#69138] [Ruby trunk - Feature #11136] [PATCH] webrick: avoid fcntl module — nobu@...
Issue #11136 has been updated by Nobuyoshi Nakada.
3 messages
2015/05/12
[#69160] [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start — nobu@...
Issue #11146 has been updated by Nobuyoshi Nakada.
4 messages
2015/05/13
[#69175] Re: [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start
— Eric Wong <normalperson@...>
2015/05/13
nobu@ruby-lang.org wrote:
[ruby-core:69064] [Ruby trunk - Bug #11117] [Open] When you refine String with to_regexp, then it breaks Regexp.try_convert even when the refinement is not used
From:
jakub@...
Date:
2015-05-03 19:16:48 UTC
List:
ruby-core #69064
Issue #11117 has been reported by Jakub Jirutka.
----------------------------------------
Bug #11117: When you refine String with to_regexp, then it breaks Regexp.try_convert even when the refinement is not used
https://bugs.ruby-lang.org/issues/11117
* Author: Jakub Jirutka
* Status: Open
* Priority: High
* Assignee:
* ruby -v: 2.2.2p95
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I’ve run into a very strange bug with refinements. Let me show you:
~~~ruby
module Ref
refine String do
def to_regexp
end
end
end
Regexp.try_convert('foo')
# or Regexp.union('foo', 'bar')
~~~
~~~
bug.rb:8:in `try_convert': undefined method `to_regexp' for "foo":String (NoMethodError)
from test.rb:8:in `<main>'
~~~
Note that the refinement is not used (_using_), only declared, and yet it has affected behaviour of the refined class! This problem occurs only when the method is named `to_string`. It seems that there’s some serious scoping issue with refinements.
I’ve reproduced this issue on MRI 2.2.2p95, 2.1.5p273, and 2.0.0p598.
--
https://bugs.ruby-lang.org/