https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2019-11-05T01:49:03Z
Ruby Issue Tracking System
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=82472
2019-11-05T01:49:03Z
shyouhei (Shyouhei Urabe)
shyouhei@ruby-lang.org
<ul></ul><p>Years ago I thought we don't need any per-class extension of rb_obj_freeze. However it seems rb_str_freeze is a thing and rb_ary_freeze can benefit the same way. I think it's now clear that there should be a C API that does <code>rb_funcall(obj, rb_intern("freeze"), 0)</code>.</p>
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=82581
2019-11-08T22:31:06Z
methodmissing (Lourens Naudé)
lourens@bearmetal.eu
<ul></ul><p>Results of <code>Array#frozen</code> -> <code>rb_ary_freeze</code> with shrink support as per suggestion from Shyouhei:</p>
<pre><code>lourens@CarbonX1:~/src/redmine$ irb
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 2.7.0dev (2019-11-05T10:33:43Z obj-freeze-specifi.. 485e4f3a84) [x86_64-linux]"
irb(main):002:0> require 'objspace'
=> true
irb(main):003:0> a = (1..5).to_a
irb(main):004:0> ObjectSpace.memsize_of(a)
=> 200
irb(main):005:0> a.freeze
=> [1, 2, 3, 4, 5]
irb(main):006:0> ObjectSpace.memsize_of(a)
=> 80
</code></pre>
<p>Master:</p>
<pre><code>lourens@CarbonX1:~/src/redmine$ irb
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 2.7.0dev (2019-11-03T14:20:01Z master 5a7487bdcd) [x86_64-linux]"
irb(main):002:0> require 'objspace'
=> true
irb(main):003:0> a = (1..5).to_a
irb(main):004:0> ObjectSpace.memsize_of(a)
=> 200
irb(main):005:0> a.freeze
=> [1, 2, 3, 4, 5]
irb(main):006:0> ObjectSpace.memsize_of(a)
=> 200
</code></pre>
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=83407
2019-12-26T02:24:50Z
mame (Yusuke Endoh)
mame@ruby-lang.org
<ul><li><strong>Tracker</strong> changed from <i>Misc</i> to <i>Feature</i></li><li><strong>Assignee</strong> set to <i>nobu (Nobuyoshi Nakada)</i></li><li><strong>Target version</strong> set to <i>36</i></li></ul><p>This ticket was discussed at the previous dev meeting, and <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> will review the patch and merge it if okay.</p>
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=83574
2019-12-31T06:43:37Z
sam.saffron (Sam Saffron)
sam.saffron@gmail.com
<ul></ul><p>related, see this for for the string api</p>
<p><a href="https://bugs.ruby-lang.org/issues/16029#change-82018" class="external">https://bugs.ruby-lang.org/issues/16029#change-82018</a></p>
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=87785
2020-09-29T03:37:27Z
hsbt (Hiroshi SHIBATA)
hsbt@ruby-lang.org
<ul><li><strong>Target version</strong> changed from <i>36</i> to <i>3.0</i></li></ul>
Ruby master - Feature #16291: Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
https://bugs.ruby-lang.org/issues/16291?journal_id=89521
2020-12-25T02:43:31Z
naruse (Yui NARUSE)
naruse@airemix.jp
<ul><li><strong>Target version</strong> deleted (<del><i>3.0</i></del>)</li></ul>