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- ruby.h: relax rb_funcall check on extra args for clang 2018-01-30 23:55:49 +00:00
bigdecimal flexible array member is a C99ism 2018-01-02 06:41:48 +00:00
cgi/escape cgi/util.rb: Don't escape tilde in #escape 2017-05-17 12:34:59 +00:00
continuation
coverage update dependencies 2018-01-09 06:55:55 +00:00
date Removed useless assertions [ci skip] 2018-03-09 03:51:04 +00:00
dbm marked as NORETURN 2018-01-18 11:34:36 +00:00
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 Bump version to fcntl-1.0.0 as default gems. 2017-12-11 06:03:53 +00:00
fiber
fiddle ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bit 2018-02-18 00:38:35 +00:00
gdbm marked as NORETURN 2018-01-18 11:34:36 +00:00
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 ext: check if null byte is contained 2017-09-30 08:35:23 +00:00
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 process.c: add :exception option to Kernel.#system 2018-01-24 14:11:25 +00:00
racc/cparse
rbconfig/sizeof configure.ac 2017-09-29 13:21:17 +00:00
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 marked as NORETURN 2018-01-18 11:34:36 +00:00
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 win32/resolv.rb: call rb_w32_osid 2018-01-18 01:10:22 +00:00
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 ext/.document: follow-up r59734 2017-09-03 13:31:34 +00:00
extmk.rb extmk.rb: exclude recursively 2018-01-07 02:49:27 +00:00
Setup Removed deprecated extensions of mathn. 2017-04-20 08:21:24 +00:00
Setup.atheos
Setup.nt