1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

fixed play -m command to deal with single lines of code (--lines LINENUM)

This commit is contained in:
John Mair 2011-09-12 13:47:44 +12:00
parent 12927073fc
commit 567546afad

View file

@ -79,7 +79,7 @@ e.g amend-line puts 'hello again' # no line number modifies immediately preced
range = opts.l? ? one_index_range_or_number(opts[:l]) : (0..-1)
range = (0..-2) if opts.o?
eval_string.replace((code.each_line.to_a[range]).join)
eval_string.replace(Array(code.each_line.to_a[range]).join)
run "show-input" if opts.o?
elsif opts.f?
file_name = File.expand_path(opts[:f])