ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:120808] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module
@ 2025-01-28 11:19 andrykonchin (Andrew Konchin) via ruby-core
  2025-01-28 18:19 ` [ruby-core:120810] " eileencodes (Eileen Uchitelle) via ruby-core
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: andrykonchin (Andrew Konchin) via ruby-core @ 2025-01-28 11:19 UTC (permalink / raw)
  To: ruby-core; +Cc: andrykonchin (Andrew Konchin)

Issue #21094 has been reported by andrykonchin (Andrew Konchin).

----------------------------------------
Bug #21094: Module#set_temporary_name does not affect a name of a nested module
https://bugs.ruby-lang.org/issues/21094

* Author: andrykonchin (Andrew Konchin)
* Status: Open
* ruby -v: 3.4.1
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Wondering whether it's intentional and correct behaviour:

```ruby
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`.



-- 
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.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:120810] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module
  2025-01-28 11:19 [ruby-core:120808] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module andrykonchin (Andrew Konchin) via ruby-core
@ 2025-01-28 18:19 ` eileencodes (Eileen Uchitelle) via ruby-core
  2025-03-27 22:08 ` [ruby-core:121461] [Ruby " alanwu (Alan Wu) via ruby-core
  2025-03-29  7:50 ` [ruby-core:121472] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: eileencodes (Eileen Uchitelle) via ruby-core @ 2025-01-28 18:19 UTC (permalink / raw)
  To: ruby-core; +Cc: eileencodes (Eileen Uchitelle)

Issue #21094 has been updated by eileencodes (Eileen Uchitelle).


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

----------------------------------------
Bug #21094: Module#set_temporary_name does not affect a name of a nested module
https://bugs.ruby-lang.org/issues/21094#change-111678

* Author: andrykonchin (Andrew Konchin)
* Status: Open
* ruby -v: 3.4.1
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Wondering whether it's intentional and correct behaviour:

```ruby
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`.



-- 
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.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:121461] [Ruby Bug#21094] Module#set_temporary_name does not affect a name of a nested module
  2025-01-28 11:19 [ruby-core:120808] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module andrykonchin (Andrew Konchin) via ruby-core
  2025-01-28 18:19 ` [ruby-core:120810] " eileencodes (Eileen Uchitelle) via ruby-core
@ 2025-03-27 22:08 ` alanwu (Alan Wu) via ruby-core
  2025-03-29  7:50 ` [ruby-core:121472] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-03-27 22:08 UTC (permalink / raw)
  To: ruby-core; +Cc: alanwu (Alan Wu)

Issue #21094 has been updated by alanwu (Alan Wu).

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 commit:5b3970f68b9108e0976b75b5d67da8c56eaa9db4

----------------------------------------
Bug #21094: Module#set_temporary_name does not affect a name of a nested module
https://bugs.ruby-lang.org/issues/21094#change-112464

* Author: andrykonchin (Andrew Konchin)
* Status: Closed
* ruby -v: 3.4.1
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE
----------------------------------------
Wondering whether it's intentional and correct behaviour:

```ruby
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`.



-- 
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.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:121472] [Ruby Bug#21094] Module#set_temporary_name does not affect a name of a nested module
  2025-01-28 11:19 [ruby-core:120808] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module andrykonchin (Andrew Konchin) via ruby-core
  2025-01-28 18:19 ` [ruby-core:120810] " eileencodes (Eileen Uchitelle) via ruby-core
  2025-03-27 22:08 ` [ruby-core:121461] [Ruby " alanwu (Alan Wu) via ruby-core
@ 2025-03-29  7:50 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2025-03-29  7:50 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

Issue #21094 has been updated by nagachika (Tomoyuki Chikanaga).

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 commit:aac5c546cd35ff0aeab120e3724fbb1296892ae3 merged revision(s) commit:f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf.

----------------------------------------
Bug #21094: Module#set_temporary_name does not affect a name of a nested module
https://bugs.ruby-lang.org/issues/21094#change-112479

* Author: andrykonchin (Andrew Konchin)
* Status: Closed
* ruby -v: 3.4.1
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE, 3.4: DONE
----------------------------------------
Wondering whether it's intentional and correct behaviour:

```ruby
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`.



-- 
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.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-29  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 11:19 [ruby-core:120808] [Ruby master Bug#21094] Module#set_temporary_name does not affect a name of a nested module andrykonchin (Andrew Konchin) via ruby-core
2025-01-28 18:19 ` [ruby-core:120810] " eileencodes (Eileen Uchitelle) via ruby-core
2025-03-27 22:08 ` [ruby-core:121461] [Ruby " alanwu (Alan Wu) via ruby-core
2025-03-29  7:50 ` [ruby-core:121472] " nagachika (Tomoyuki Chikanaga) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).