ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

June 2024

  • 1 participants
  • 209 discussions
[ruby-core:117653] [Ruby master Bug#20446] OUtdated https://cache.ruby-lang.org/pub/ruby/index.txt
by vo.x (Vit Ondruch) 09 Jul '24

09 Jul '24
Issue #20446 has been reported by vo.x (Vit Ondruch). ---------------------------------------- Bug #20446: OUtdated https://cache.ruby-lang.org/pub/ruby/index.txt https://bugs.ruby-lang.org/issues/20446 * Author: vo.x (Vit Ondruch) * Status: Open * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Is the https://cache.ruby-lang.org/pub/ruby/index.txt the place, where all Ruby releases can be found? If yes, then can this file be update with Ruby 3.3.1, 3.2.4 etc? If no, can this file be removed to avoid confusion? -- https://bugs.ruby-lang.org/
3 6
0 0
[ruby-core:118269] [Ruby master Bug#20570] Nokey behavior changed since 3.3.
by ksss (Yuki Kurihara) 08 Jul '24

08 Jul '24
Issue #20570 has been reported by ksss (Yuki Kurihara). ---------------------------------------- Bug #20570: Nokey behavior changed since 3.3. https://bugs.ruby-lang.org/issues/20570 * Author: ksss (Yuki Kurihara) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [arm64-darwin22] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I am using code that transfers the following method call, but found that the behavior has changed since CRuby 3.3. ```ruby receiver_value = Set.new method_name = :merge args = [1] kwargs = {} block = nil receiver_value.__send__(method_name, *args, **kwargs, &block) # => no keywords accepted (ArgumentError) ``` Upon investigation, I found that the behavior of calling a method using `**nil` has changed starting from version 3.3. ``` $ docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-2.6 ./all-ruby -e 'def foo(*, **nil); end; p foo(*[], **{})' WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested ruby-2.6.0 -e:1: syntax error, unexpected nil, expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ... ruby-2.6.10 -e:1: syntax error, unexpected nil, expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ruby-2.7.0-preview1 -e:1: syntax error, unexpected `nil', expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ruby-2.7.0-preview2 nil ... ruby-3.2.4 nil ruby-3.3.0-preview1 -e:1:in `<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ... ruby-3.3.2 -e:1:in `<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ruby-3.4.0-preview1 -e:1:in '<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ``` Is this change intentional? -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:116597] [Ruby master Bug#20239] Segmentation fault when using Regex on a large String
by martinsp (Martins Polakovs) 08 Jul '24

08 Jul '24
Issue #20239 has been reported by martinsp (Martins Polakovs). ---------------------------------------- Bug #20239: Segmentation fault when using Regex on a large String https://bugs.ruby-lang.org/issues/20239 * Author: martinsp (Martins Polakovs) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Since v3.2.0 ruby crashes with segmentation fault on the following script with a `[BUG] Segmentation fault at ...` ``` ruby require "rbconfig/sizeof" ("\u{0101}" + "a" * RbConfig::LIMITS["INT_MAX"] + "b").match(/b/) ``` Crash can be reproduced on the following ruby versions: - ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux] - ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [aarch64-linux] - ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux] ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [aarch64-linux] works as expected It seems that call to `enclen` inside `str_lower_case_match` returns negative offset in this case https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/v3… -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:118399] [Ruby master Bug#20598] Corruption of internal encoding string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20598 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20598: Corruption of internal encoding string https://bugs.ruby-lang.org/issues/20598 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11068 Just like #20595, Encoding#name_list and Encoding#aliases can have their strings corrupted when Encoding.default_internal is set to nil. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118391] [Ruby master Bug#20595] Corruption of encoding name string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20595 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20595: Corruption of encoding name string https://bugs.ruby-lang.org/issues/20595 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11062 enc_set_default_encoding will free the C string if the encoding is nil, but the C string can be used by the encoding name string. This will cause the encoding name string to be corrupted. Consider the following code: ```ruby Encoding.default_internal = Encoding::ASCII_8BIT names = Encoding.default_internal.names p names Encoding.default_internal = nil p names ``` It outputs: ``` ["ASCII-8BIT", "BINARY", "internal"] ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"] ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:118345] [Ruby master Bug#20585] Size of memory allocated by String.new(:capacity) is different from the specified value
by os (Shigeki OHARA) 08 Jul '24

08 Jul '24
Issue #20585 has been reported by os (Shigeki OHARA). ---------------------------------------- Bug #20585: Size of memory allocated by String.new(:capacity) is different from the specified value https://bugs.ruby-lang.org/issues/20585 * Author: os (Shigeki OHARA) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-freebsd14.0] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- IMHO, if :capacity is specified in String.new, capa will be its value. In fact, Ruby 3.2 seems to allocate the size as specified. ``` % cat string_capacity.rb unless /\A3\.[23]\./ =~ RUBY_VERSION raise NotImplementedError, 'Not Supported Ruby Version' end require 'inline' class String def super_inspect self.class.superclass.instance_method(:inspect).bind(self).call end inline do |builder| builder.include '<stdio.h>' builder.add_compile_flags '-Wall' builder.c_raw <<~CODE VALUE capacity(int argc, VALUE *argv, VALUE self) { struct RString *rstring = RSTRING(self); if (! (RBASIC(self)->flags & RSTRING_NOEMBED)) { return rb_to_symbol(rb_str_new_cstr("EMBED")); } else { if (RBASIC(self)->flags & ELTS_SHARED) { return rb_to_symbol(rb_str_new_cstr("SHARED")); } else { return LONG2NUM(rstring->as.heap.aux.capa); } } return Qnil; /* NOTREACHED */ } CODE end end ``` ``` % irb -I. -rstring_capacity irb(main):001:0> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.2.4"] irb(main):002:0> String.new('', capacity: 1024).capacity => 1024 irb(main):003:0> String.new('*'*1024, capacity: 1024).capacity => 1024 irb(main):004:0> ``` This is what I expect. However, Ruby 3.3 seems to behave differently. ``` % irb -I. -rstring_capacity irb(main):001> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.3.2"] irb(main):002> String.new('', capacity: 1024).capacity => 1023 irb(main):003> String.new('*'*1024, capacity: 1024).capacity => 2047 irb(main):004> ``` * If only :capacity is specified, one byte less is allocated. * If the initial string and its bytesize are specified, about twice the size is allocated. Is this intentional? -- https://bugs.ruby-lang.org/
4 4
0 0
[ruby-core:118320] [Ruby master Bug#20581] Ruby 3.3.3 install has missing deps for bundled net-pop gem
by MatzFan (Bruce Steedman) 08 Jul '24

08 Jul '24
Issue #20581 has been reported by MatzFan (Bruce Steedman). ---------------------------------------- Bug #20581: Ruby 3.3.3 install has missing deps for bundled net-pop gem https://bugs.ruby-lang.org/issues/20581 * Author: MatzFan (Bruce Steedman) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- A stackoverflow question and answer has identified an issue with the Ruby 3.3.3 install which can cause a failure when bundler installs gem dependencies. https://stackoverflow.com/a/78620570/4114896 A workaround has been described. There is a related issue with the net-pop gem here: https://github.com/ruby/net-pop/issues/26 -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:118226] [Ruby master Bug#20562] Categorize `RUBY_FREE_AT_EXIT` warning
by nobu (Nobuyoshi Nakada) 08 Jul '24

08 Jul '24
Issue #20562 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20562: Categorize `RUBY_FREE_AT_EXIT` warning https://bugs.ruby-lang.org/issues/20562 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```sh $ RUBY_FREE_AT_EXIT=1 ruby -W:no-experimental -ep ruby: warning: Free at exit is experimental and may be unstable ``` It should be categorized as experimental as its message. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:116078] [Ruby master Bug#20162] Memory leak when duplicating too complex object
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20162 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20162: Memory leak when duplicating too complex object https://bugs.ruby-lang.org/issues/20162 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: DONTNEED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/9449 Creating a ST table then calling st_replace leaks memory because the st_replace overwrites the ST table without freeing any of the existing memory. This commit changes it to use st_copy instead. For example: ```ruby RubyVM::Shape.exhaust_shapes o = Object.new o.instance_variable_set(:@a, 0) 10.times do 100_000.times { o.dup } puts `ps -o rss= -p #{$$}` end ``` Before: ``` 23264 33600 42672 52160 61600 71728 81056 90528 100560 109840 ``` After: ``` 14752 14816 15584 15584 15664 15664 15664 15664 15664 15664 ``` -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:114932] [Ruby master Bug#19907] Method calls with keyword arguments in eval leaks callcache and callinfo objects
by peterzhu2118 (Peter Zhu) 07 Jul '24

07 Jul '24
Issue #19907 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #19907: Method calls with keyword arguments in eval leaks callcache and callinfo objects https://bugs.ruby-lang.org/issues/19907 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The following script leaks callcache and callinfo objects: ```ruby def foo(a:); end 10.times do 10_000.times do eval(<<~RUBY) foo(a: 1) RUBY end puts "Number of live objects: #{GC.stat(:heap_live_slots)}" puts "Memory usage: #{`ps -o rss= -p #{$$}`}" puts end ``` Output is: ``` Number of live objects: 46248 Memory usage: 16160 Number of live objects: 65902 Memory usage: 19888 Number of live objects: 92656 Memory usage: 24032 Number of live objects: 126791 Memory usage: 28048 Number of live objects: 132919 Memory usage: 28816 Number of live objects: 180687 Memory usage: 32384 Number of live objects: 181957 Memory usage: 32464 Number of live objects: 227485 Memory usage: 34224 Number of live objects: 256101 Memory usage: 37200 Number of live objects: 274151 Memory usage: 38752 ``` After performing a `ObjectSpace.dump_all`, I found that it is leaking callcache and callinfo objects that is being held on by the `Object` class. ```json {"address":"0x102ecef70", "type":"CLASS", "shape_id":2, "slot_size":160, "class":"0x102ecf8d0", "variation_count":0, "superclass":"0x102ecfd30", "real_class_name":"Object", "singleton":true, "references":[ ... ]} {"address":"0x1030c90a0", "type":"IMEMO", "shape_id":0, "slot_size":40, "imemo_type":"callinfo", "mid":"foo", "memsize":40, "flags":{"wb_protected":true}} {"address":"0x102fad568", "type":"IMEMO", "shape_id":0, "slot_size":40, "imemo_type":"callcache", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} ``` -- https://bugs.ruby-lang.org/
5 4
0 0
  • ← Newer
  • 1
  • ...
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • ...
  • 21
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.