[#120465] [Ruby master Bug#20998] rb_str_locktmp() changes flags of frozen strings and string literals — "Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Issue #20998 has been reported by Eregon (Benoit Daloze).
17 messages
2025/01/03
[ruby-core:120568] [Ruby master Bug#20920] When loading a file, __FILE__ gets relative paths expanded only when they start with "./"
From:
"mame (Yusuke Endoh) via ruby-core" <ruby-core@...>
Date:
2025-01-09 11:33:05 UTC
List:
ruby-core #120568
Issue #20920 has been updated by mame (Yusuke Endoh). Discussed at the dev meeting. @matz suggested that we try modifying it so t= hat only the `load "foo.rb"` case is a full path, and leave the other cases= as is. ``` $ ruby foo.rb foo.rb # This should be kept $ ruby ./foo.rb ./foo.rb # This should be kept $ ruby -e 'load "foo.rb"' foo.rb # This should be a full path $ ruby -e 'load "./foo.rb"' /full/path/to/foo.rb # This should be kept ``` ---------------------------------------- Bug #20920: When loading a file, __FILE__ gets relative paths expanded only= when they start with "./" https://bugs.ruby-lang.org/issues/20920#change-111392 * Author: deivid (David Rodr=EDguez) * Status: Open * ruby -v: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` $ cat foo.rb puts __FILE__ $ ruby foo.rb =20 foo.rb $ ruby ./foo.rb =20 ./foo.rb $ ruby -e 'load "foo.rb"' =20 foo.rb $ ruby -e 'load "./foo.rb"' /full/path/to/foo.rb ``` More than an issue, this is mainly a question. In principle, it seems more = consistent to me to either expand or not expand, but this is not causing re= al issues for me. I just want to figure out what to do with one pending spe= c in Bundler (https://github.com/rubygems/rubygems/blob/cd65092deb316875982= 0c613ecbc54cd9e06d46f/bundler/spec/commands/exec_spec.rb#L1023-L1028). --=20 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/lists/ruby-core.ml.rub= y-lang.org/