Rollback untoward mutations.

This commit is contained in:
Shannon Skipper 2013-11-24 15:16:28 -08:00
parent 16c08857a6
commit 9d5a1415ac
4 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ Copyright (c) 2013 John Mair (banisterfiend)
-- --
} }
on :e, :exec=, "A line of code to execute in context before the session starts" do |input| on :e, :exec=, "A line of code to execute in context before the session starts" do |input|
exec_string << input << "\n" exec_string + input + "\n"
end end
on "no-pager", "Disable pager for long output" do on "no-pager", "Disable pager for long output" do

View File

@ -52,7 +52,7 @@ class Pry
end end
def replace_in_array(array, range) def replace_in_array(array, range)
array[range] = arg_string << "\n" array[range] = arg_string + "\n"
end end
# @return [Fixnum] The number of lines currently in `eval_string` (the input buffer). # @return [Fixnum] The number of lines currently in `eval_string` (the input buffer).

View File

@ -97,7 +97,7 @@ class Pry
output.puts text.bold(klass.name) output.puts text.bold(klass.name)
grouped[klass].each do |method| grouped[klass].each do |method|
header = method.name_with_owner header = method.name_with_owner
output.puts header << additional_info(header, method) output.puts header + additional_info(header, method)
end end
end end

View File

@ -156,7 +156,7 @@ class Pry
before.times{ prefix.sub! SPACES, '' } before.times{ prefix.sub! SPACES, '' }
new_prefix = prefix + SPACES * after new_prefix = prefix + SPACES * after
line = prefix << line.lstrip unless previously_in_string line = prefix + line.lstrip unless previously_in_string
output += line output += line