[#112457] [Ruby master Feature#19443] Cache `Process.pid` — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #19443 has been reported by byroot (Jean Boussier).
16 messages
2023/02/16
[#112584] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system — "normalperson (Eric Wong) via ruby-core" <ruby-core@...>
Issue #19465 has been reported by normalperson (Eric Wong).
9 messages
2023/02/25
[#112595] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— "nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
2023/02/25
SXNzdWUgIzE5NDY1IGhhcyBiZWVuIHVwZGF0ZWQgYnkgbm9idSAoTm9idXlvc2hpIE5ha2FkYSku
[#112613] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/26
"nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
[#112615] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— SHIBATA Hiroshi via ruby-core <ruby-core@...>
2023/02/27
MzUxMzZlMWU5YzIzMmFkN2EwMzQwN2I5OTJiMmU4NmI2ZGY0M2Y2MyBpcyBicm9rZW4gd2l0aCBg
[#112626] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/28
```
[ruby-core:112209] [Ruby master Bug#14083] Refinement in block calling incorrect method
From:
"alanwu (Alan Wu) via ruby-core" <ruby-core@...>
Date:
2023-02-03 19:42:41 UTC
List:
ruby-core #112209
Issue #14083 has been updated by alanwu (Alan Wu).
Status changed from Open to Rejected
This is working as intended. Scoping rules for refinements is similar
to the scoping rules for constant resolution. The scope only
changes when one uses the `class`/`module` keyword. In the posted
example the two `using` calls act on the same scope; the refinement
scope does not end when the block scope ends.
See also: https://bugs.ruby-lang.org/issues/11779#note-31
----------------------------------------
Bug #14083: Refinement in block calling incorrect method
https://bugs.ruby-lang.org/issues/14083#change-101640
* Author: bjfish (Brandon Fish)
* Status: Rejected
* Priority: Normal
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Tested on ruby versions 2.3.4 and 2.4.1
When a refinement is used inside a block, the scope of the refinement is not ending when the block has ended. The following example illustrates the issue:
Example:
~~~ ruby
class Example
def test
puts "Example#test"
end
end
module M1
refine Example do
def test
puts "Example#test in M1"
end
end
end
module M2
refine Example do
def test
puts "Example#test in M2"
end
end
end
e = Example.new
[M1, M2].each { |r|
e.test
using r
e.test
}
~~~
Actual Output
~~~ text
Example#test
Example#test in M1
Example#test in M1
Example#test in M2
~~~
Expected output
~~~ text
Example#test
Example#test in M1
Example#test
Example#test in M2
~~~
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/