[#121791] [Ruby Bug#21298] `ObjectSpace.allocation_class_path` returns inconsistent results depending on `TracePoint` state — "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>

Issue #21298 has been reported by mame (Yusuke Endoh).

6 messages 2025/05/01

[#121830] [Ruby Feature#21309] Can Thread::Mutex be Ractor shareable? — "osyoyu (Daisuke Aritomo) via ruby-core" <ruby-core@...>

Issue #21309 has been reported by osyoyu (Daisuke Aritomo).

11 messages 2025/05/05

[#121837] [Ruby Feature#21311] Namespace on read (revised) — "tagomoris (Satoshi Tagomori) via ruby-core" <ruby-core@...>

Issue #21311 has been reported by tagomoris (Satoshi Tagomori).

109 messages 2025/05/06

[#121941] [Ruby Bug#21315] Finalizers violate the `rb_ractor_confirm_belonging` assertion — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #21315 has been reported by byroot (Jean Boussier).

8 messages 2025/05/09

[#121950] [Ruby Bug#21316] Namespaces leak with permanent names — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21316 has been reported by fxn (Xavier Noria).

10 messages 2025/05/09

[#121956] [Ruby Bug#21321] Namespaces do not support extending mixins — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21321 has been reported by fxn (Xavier Noria).

8 messages 2025/05/09

[#121973] [Ruby Bug#21322] Namespaces and builtin classes as arguments and return values — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

Issue #21322 has been reported by fxn (Xavier Noria).

8 messages 2025/05/10

[#122054] [Ruby Bug#21333] heap-use-after-free caused by rehash during update — "cyruscyliu (Qiang Liu) via ruby-core" <ruby-core@...>

Issue #21333 has been reported by cyruscyliu (Qiang Liu).

9 messages 2025/05/13

[#122086] [Ruby Bug#21337] Using `not` on the RHS of a logical operator becomes valid syntax with Prism — "koic (Koichi ITO) via ruby-core" <ruby-core@...>

Issue #21337 has been reported by koic (Koichi ITO).

7 messages 2025/05/14

[#122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines — "christo (Chris Alberti) via ruby-core" <ruby-core@...>

Issue #21340 has been reported by christo (Chris Alberti).

12 messages 2025/05/14

[#122114] [Ruby Bug#21341] `Namespace is not a module (TypeError)` without enabling the namespace — "yahonda (Yasuo Honda) via ruby-core" <ruby-core@...>

Issue #21341 has been reported by yahonda (Yasuo Honda).

7 messages 2025/05/15

[#122121] [Ruby Bug#21342] Segfault: invalid keeping_mutexes when using Mutex in Thread then Fiber after GC — "maciej.mensfeld (Maciej Mensfeld) via ruby-core" <ruby-core@...>

Issue #21342 has been reported by maciej.mensfeld (Maciej Mensfeld).

11 messages 2025/05/15

[#122154] [Ruby Feature#21346] Introduce `String#ensure_suffix` — "matheusrich (Matheus Richard) via ruby-core" <ruby-core@...>

Issue #21346 has been reported by matheusrich (Matheus Richard).

21 messages 2025/05/16

[#122164] [Ruby Feature#21347] Add `open_timeout` as an overall timeout option for `Socket.tcp` — "shioimm (Misaki Shioi) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzQ3IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHNoaW9pbW0gKE1pc2FraSBTaGlvaSku

9 messages 2025/05/17

[#122184] [Ruby Misc#21350] Bundled gems lack online documentation — "osyoyu (Daisuke Aritomo) via ruby-core" <ruby-core@...>

Issue #21350 has been reported by osyoyu (Daisuke Aritomo).

8 messages 2025/05/18

[#122218] [Ruby Bug#21357] Crash in Hash#merge! with ruby-dev in rubocop-rspec test suite — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21357 has been reported by Earlopain (Earlopain _).

7 messages 2025/05/21

[#122228] [Ruby Feature#21359] Introduce `Exception#cause=` for Post-Initialization Assignment — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzU5IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGlvcXVhdGl4IChTYW11ZWwgV2lsbGlh

9 messages 2025/05/22

[#122242] [Ruby Feature#21365] Add `Namespace#eval` — "tenderlovemaking (Aaron Patterson) via ruby-core" <ruby-core@...>

Issue #21365 has been reported by tenderlovemaking (Aaron Patterson).

12 messages 2025/05/22

[#122258] [Ruby Misc#21367] Remove link to ruby-doc.org from www.ruby-lang.org/en/documentation/ — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>

Issue #21367 has been reported by p8 (Petrik de Heus).

11 messages 2025/05/23

[#122277] [Ruby Bug#21371] Proposal to Remove SPARC Architecture Support from Ruby — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzcxIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGlvcXVhdGl4IChTYW11ZWwgV2lsbGlh

10 messages 2025/05/24

[#122343] [Ruby Misc#21385] Namespace: Suggesting a rename — "fxn (Xavier Noria) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzg1IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGZ4biAoWGF2aWVyIE5vcmlhKS4NCg0K

32 messages 2025/05/30

[#122345] [Ruby Feature#21386] Introduce `Enumerable#join_map` — "matheusrich (Matheus Richard) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMzg2IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG1hdGhldXNyaWNoIChNYXRoZXVzIFJp

12 messages 2025/05/30

[ruby-core:122081] [Ruby Feature#21335] Namespaces should be present in the backtrace

From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>
Date: 2025-05-14 00:50:57 UTC
List: ruby-core #122081
Issue #21335 has been updated by mame (Yusuke Endoh).


It is possible to change how to display the backtrace to show class names that are not completely bound to constants.
I have conservatively designed the current spec of the backtrace to avoid potential confusing output, but I'm not sure which would be better.

```diff
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 26e0a6fb76..15ec9b7a4d 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -201,20 +201,19 @@ VALUE rb_mod_name0(VALUE klass, bool *permanent);
 VALUE
 rb_gen_method_name(VALUE owner, VALUE name)
 {
-    bool permanent;
     if (RB_TYPE_P(owner, T_CLASS) || RB_TYPE_P(owner, T_MODULE)) {
         if (RCLASS_SINGLETON_P(owner)) {
             VALUE v = RCLASS_ATTACHED_OBJECT(owner);
             if (RB_TYPE_P(v, T_CLASS) || RB_TYPE_P(v, T_MODULE)) {
-                v = rb_mod_name0(v, &permanent);
-                if (permanent && !NIL_P(v)) {
+                v = rb_mod_name(v);
+                if (!NIL_P(v)) {
                     return rb_sprintf("%"PRIsVALUE".%"PRIsVALUE, v, name);
                 }
             }
         }
         else {
-            owner = rb_mod_name0(owner, &permanent);
-            if (permanent && !NIL_P(owner)) {
+            owner = rb_mod_name(owner);
+            if (!NIL_P(owner)) {
                 return rb_sprintf("%"PRIsVALUE"#%"PRIsVALUE, owner, name);
             }
         }
```

```
$ RUBY_NAMESPACE=1 ./miniruby test.rb
./miniruby: warning: Namespace is experimental, and the behavior may change in the future!
See doc/namespace.md for know issues, etc.
foo.rb:9:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
foo.rb:7:in '#<Namespace:0x00007ff4d61f93e0>::Foo.test'
foo.rb:9:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
foo.rb:7:in '#<Namespace:0x00007ff4d61f93e0>::Foo.test'
foo.rb:9:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
foo.rb:7:in '#<Namespace:0x00007ff4d61f93e0>::Foo.test'
foo.rb:9:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
foo.rb:7:in '#<Namespace:0x00007ff4d61f93e0>::Foo.test'
foo.rb:9:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
foo.rb:7:in '#<Namespace:0x00007ff4d61f9f20>::Foo.test'
test.rb:23:in '<main>'
```


----------------------------------------
Feature #21335: Namespaces should be present in the backtrace
https://bugs.ruby-lang.org/issues/21335#change-113237

* Author: tenderlovemaking (Aaron Patterson)
* Status: Open
----------------------------------------
Namespaces can call in to other name spaces. I think it might be helpful if namespace information is in the backtrace.

For example:

```ruby
File.binwrite "foo.rb", <<-eorb
class Foo
  def self.test(ns1, ns2, count)
    if count == 0
      puts caller
    else
      if count % 2 == 0
        ns1::Foo.test(ns1, ns2, count - 1)
      else
        ns2::Foo.test(ns1, ns2, count - 1)
      end
    end
  end
end
eorb

ns1 = Namespace.new
ns1.load "foo.rb"

ns2 = Namespace.new
ns2.load "foo.rb"

ns1::Foo.test(ns1, ns2, 10)
```

The output is like this:

```
See doc/namespace.md for known issues, etc.
/Users/aaron/git/ruby/exe/ruby: warning: Namespace is experimental, and the behavior may change in the future!
See doc/namespace.md for known issues, etc.
/Users/aaron/git/ruby/foo.rb:9:in 'test'
/Users/aaron/git/ruby/foo.rb:7:in 'test'
/Users/aaron/git/ruby/foo.rb:9:in 'test'
/Users/aaron/git/ruby/foo.rb:7:in 'test'
/Users/aaron/git/ruby/foo.rb:9:in 'test'
/Users/aaron/git/ruby/foo.rb:7:in 'test'
/Users/aaron/git/ruby/foo.rb:9:in 'test'
/Users/aaron/git/ruby/foo.rb:7:in 'test'
/Users/aaron/git/ruby/foo.rb:9:in 'test'
/Users/aaron/git/ruby/foo.rb:7:in 'test'
./test.rb:23:in '<main>'
```

`Foo.test` alternates between namespaces when calling a method, but you can't tell from the backtrace.  I think we should include namespaces in the backtrace.



-- 
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/


In This Thread