[#113435] [Ruby master Feature#19634] Pattern matching dynamic key — "baweaver (Brandon Weaver) via ruby-core" <ruby-core@...>
Issue #19634 has been reported by baweaver (Brandon Weaver).
6 messages
2023/05/09
[#113489] [Ruby master Bug#19642] Remove vectored read/write from `io.c`. — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>
Issue #19642 has been reported by ioquatix (Samuel Williams).
10 messages
2023/05/15
[ruby-core:113410] [Ruby master Bug#19631] module_eval does not propulate absolute_path for Kernel.caller_locations
From:
"daveola (David Stellar) via ruby-core" <ruby-core@...>
Date:
2023-05-06 03:06:59 UTC
List:
ruby-core #113410
Issue #19631 has been reported by daveola (David Stellar).
----------------------------------------
Bug #19631: module_eval does not propulate absolute_path for Kernel.caller_locations
https://bugs.ruby-lang.org/issues/19631
* Author: daveola (David Stellar)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I am using module_eval and noticing that since ruby 3.2 the Kernel locations do not have absolute_path for any of the eval code, though the path is available. This is a regression since at least ruby 3.0 which still works.
I am on 3.2.2, and here is some sample code:
----
class Script < Module
script = %q{
def self.locations
Kernel.caller_locations.each { |loc|
puts "LOCATION: #{loc}"
puts "ABSPATH: #{loc.absolute_path}"
puts "PATH: #{loc.path}"
}
end
self.locations
}
module_eval(script, "/this/is/my/path", 0)
end
------
The output for the code at the top of the caller locations (inside the module_eval) is:
LOCATION: /this/is/my/path:9:in `<class:Script>'
ABSPATH:
PATH: /this/is/my/path
But the absolute_path should have the correct path data as well
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/