fixed attempted modification of frozen string file_name
Under MRI 1.9, file_name comes from Method#source_location, which freezes the filename returned. This fix just reassigns file_name to the result of the gsub call, instead of sending gsub!.
This commit is contained in:
parent
f8835a9b2c
commit
0cbbb6206a
|
@ -197,7 +197,7 @@ class Pry
|
|||
end
|
||||
|
||||
def start_line_syntax_for_editor(file_name, line_number)
|
||||
file_name.gsub!(/\//, '\\') if RUBY_PLATFORM =~ /mswin|mingw/
|
||||
file_name = file_name.gsub(/\//, '\\') if RUBY_PLATFORM =~ /mswin|mingw/
|
||||
|
||||
case Pry.editor
|
||||
when /^[gm]?vi/, /^emacs/, /^nano/, /^pico/, /^gedit/, /^kate/
|
||||
|
|
Loading…
Reference in New Issue