1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
k0kubun 67bb95936d Fix FrozenError on Ripper.slice
Currently `Ripper.slice` raises a FrozenError

```ruby
require 'ripper'
p Ripper.slice('foo', 'ident')
```

```
/path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError)
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice'
	from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>'
```

This patch will fix the problem.

[Fix GH-1837]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13 12:56:04 +00:00
..
-test-
bigdecimal
cgi/escape
continuation
coverage
date Removed useless assertions [ci skip] 2018-03-09 03:51:04 +00:00
dbm
digest no ID cache in Init functions 2018-02-16 08:39:48 +00:00
etc Refactor ERB version checking for keyword arguments 2018-02-27 11:12:23 +00:00
fcntl
fiber
fiddle ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bit 2018-02-18 00:38:35 +00:00
gdbm
io io/console: drop 2.1.0 support [ci skip] 2018-03-02 11:24:29 +00:00
json no ID cache in Init functions 2018-02-16 08:39:48 +00:00
nkf
objspace no ID cache in Init functions 2018-02-16 08:39:48 +00:00
openssl openssl: search winsock 2018-03-02 14:45:28 +00:00
pathname Improve Pathname performance 2018-03-13 09:15:10 +00:00
psych no ID cache in Init functions 2018-02-16 08:39:48 +00:00
pty
racc/cparse
rbconfig/sizeof
readline no ID cache in Init functions 2018-02-16 08:39:48 +00:00
ripper Fix FrozenError on Ripper.slice 2018-03-13 12:56:04 +00:00
rubyvm
sdbm
socket search winsock libraries explicitly 2018-03-02 04:36:14 +00:00
stringio no ID cache in Init functions 2018-02-16 08:39:48 +00:00
strscan no ID cache in Init functions 2018-02-16 08:39:48 +00:00
syslog no ID cache in Init functions 2018-02-16 08:39:48 +00:00
win32
win32ole ext/win32ole/win32ole.c: fix typo. [ci skip] 2018-03-10 06:46:01 +00:00
zlib no ID cache in Init functions 2018-02-16 08:39:48 +00:00
.document
extmk.rb
Setup
Setup.atheos
Setup.nt