[#74190] [Ruby trunk Feature#12134] Comparison between `true` and `false` — duerst@...
SXNzdWUgIzEyMTM0IGhhcyBiZWVuIHVwZGF0ZWQgYnkgTWFydGluIETDvHJzdC4KCgpUc3V5b3No
3 messages
2016/03/07
[#74269] Type systems for Ruby — Rob Blanco <ml@...>
Dear ruby-core,
5 messages
2016/03/10
[#74395] [Ruby trunk Feature#12142] Hash tables with open addressing — shyouhei@...
Issue #12142 has been updated by Shyouhei Urabe.
3 messages
2016/03/17
[ruby-core:74692] [Ruby trunk Bug#11910] resolv.rb - can't modify frozen String in #scan
From:
naruse@...
Date:
2016-03-29 13:59:43 UTC
List:
ruby-core #74692
Issue #11910 has been updated by Yui NARUSE.
Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE
ruby_2_3 r54404 merged revision(s) 53363.
----------------------------------------
Bug #11910: resolv.rb - can't modify frozen String in #scan
https://bugs.ruby-lang.org/issues/11910#change-57821
* Author: Henry Helper
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: 2.3.0
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE
----------------------------------------
lib/resolv.rb contains "frozen_string_literal: true". This causes an error in a travis build from https://github.com/middleman/middleman/pull/1713.
~~~ruby
/home/travis/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/resolv.rb:2462:in `block in create': can't modify frozen String (RuntimeError)
from /home/travis/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/resolv.rb:2462:in `scan'
from /home/travis/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/resolv.rb:2462:in `create'
from /home/travis/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/resolv.rb:462:in `each_name'
~~~
The code in line lib/resolv.rb#L2462 (https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L2462) causes the error. It modifies a string.
~~~ruby
prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')}
~~~
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>