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
@ -172,7 +172,7 @@ class Reline::ANSI
|
|||||||
|
|
||||||
def self.cursor_pos
|
def self.cursor_pos
|
||||||
begin
|
begin
|
||||||
res = ''
|
res = String.new
|
||||||
m = nil
|
m = nil
|
||||||
@@input.raw do |stdin|
|
@@input.raw do |stdin|
|
||||||
@@output << "\e[6n"
|
@@output << "\e[6n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user