Actions
Bug #16687
closedRipper.slice FrozenError in ruby 2.5
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.6p201 (2019-08-28 revision 67793) [x86_64-linux]
Description
Trying the example from the Ripper.slice documentation:
require 'ripper'
p Ripper.slice('def m(a) nil end', 'ident')
#=> /opt/ruby/2.5/lib/ruby/2.5.0/ripper/lexer.rb:199:in `concat': can't modify frozen String (FrozenError)
Just needs to change lexer.rb:195 from buf = ''
to buf = +''
Updated by jeremyevans0 (Jeremy Evans) about 4 years ago
- Status changed from Open to Closed
- Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: REQUIRED, 2.6: DONTNEED, 2.7: DONTNEED
This is the related commit for backporting: 67bb95936d241bd452f3bcfb76276e0ab61234f0.
Note that Ruby 2.5 will be moving from the normal maintenance phase to the security maintenance phase in about 4 days.
Updated by usa (Usaku NAKAMURA) about 4 years ago
- Backport changed from 2.5: REQUIRED, 2.6: DONTNEED, 2.7: DONTNEED to 2.5: DONE, 2.6: DONTNEED, 2.7: DONTNEED
ruby_2_5 r67871 merged revision(s) 62743.
Actions
Like0
Like0Like0