mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cope with frozen-string-literal
When running irb 1.2.1 (2019-12-24) with frozen-string-literal enabled, it crashes in reline with `can't modify frozen String (FrozenError)` Steps to reproduce: `RUBYOPT="--enable-frozen-string-literal" irb`
This commit is contained in:
parent
0cf073088e
commit
f4386413f1
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ class Reline::ANSI
|
|||
|
||||
def self.cursor_pos
|
||||
begin
|
||||
res = ''
|
||||
res = String.new
|
||||
m = nil
|
||||
@@input.raw do |stdin|
|
||||
@@output << "\e[6n"
|
||||
|
|
Loading…
Add table
Reference in a new issue