Actions
Bug #21094
closedModule#set_temporary_name does not affect a name of a nested module
Description
Wondering whether it's intentional and correct behaviour:
m = Module.new
m::N = Module.new
p m::N.name # => "#<Module:0x000000010d0a00b0>::N"
m.set_temporary_name("foo")
p m::N.name # => "#<Module:0x000000010d0a00b0>::N"
I would expect that setting foo
as a temporary name changes m::N.name
to foo::N
.
Updated by eileencodes (Eileen Uchitelle) 2 months ago
This seems like a bug to me because if you set the temp name before creating N
it works as you expected. Opened a PR https://github.com/ruby/ruby/pull/12658
Updated by nobu (Nobuyoshi Nakada) 13 days ago
- Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: REQUIRED
Updated by nobu (Nobuyoshi Nakada) 13 days ago
- Status changed from Open to Closed
Applied in changeset git|f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf.
[Bug #21094] Update nested module names when setting temporary name
Updated by alanwu (Alan Wu) 4 days ago
- Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE
3.4 backport done at 5b3970f68b9108e0976b75b5d67da8c56eaa9db4
Updated by nagachika (Tomoyuki Chikanaga) 2 days ago
- Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE, 3.4: DONE
ruby_3_3 aac5c546cd35ff0aeab120e3724fbb1296892ae3 merged revision(s) f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf.
Actions
Like0
Like1Like0Like0Like0Like0