[#94657] [Ruby master Feature#16131] Remove $SAFE, taint and trust — naruse@...
Issue #16131 has been reported by naruse (Yui NARUSE).
3 messages
2019/08/29
[ruby-core:94148] [Ruby master Bug#15720] SystemStackError when referencing a refinement in a module that isn't used
From:
nagachika00@...
Date:
2019-08-05 14:06:07 UTC
List:
ruby-core #94148
Issue #15720 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: DONE
ruby_2_6 r67729 merged revision(s) 5e018214e7435030727a97ac49db038d96438e74.
----------------------------------------
Bug #15720: SystemStackError when referencing a refinement in a module that isn't used
https://bugs.ruby-lang.org/issues/15720#change-80394
* Author: chocolateboy (Chocolate Boy)
* Status: Closed
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-21 trunk 67332) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
```ruby
module M1
refine Kernel do
def foo
'foo called!'
end
end
end
module M2
refine Kernel do
def bar
'bar called!'
end
end
end
using M1
puts foo
puts bar
```
Expected:
```
foo called!
Traceback (most recent call last):
bug.rb:20:in `<main>': undefined local variable or method `bar' for main:Object (NameError)
```
Actual:
```
foo called!
Traceback (most recent call last):
bug.rb:20:in `<main>': stack level too deep (SystemStackError)
```
Platform: Linux (Arch)
ruby -v:
- ruby 2.7.0dev (2019-03-21 trunk 67332) [x86_64-linux]
- ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux]
- ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
---Files--------------------------------
bug.rb (188 Bytes)
sse-unused-refinement.patch (1.85 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>