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

Don't show syntax warnings many times

This commit is contained in:
Conrad Irwin 2012-01-15 11:34:14 -08:00
parent e8fa7ae06c
commit 68f6519c48

View file

@ -591,9 +591,11 @@ class Pry
elsif defined?(Rubinius::Melbourne) elsif defined?(Rubinius::Melbourne)
Rubinius::Melbourne.parse_string(str, Pry.eval_path) Rubinius::Melbourne.parse_string(str, Pry.eval_path)
else else
catch(:valid) { catch(:valid) do
eval("BEGIN{throw :valid}\n#{str}", binding, Pry.eval_path) Helpers::BaseHelpers.silence_warnings do
} eval("BEGIN{throw :valid}\n#{str}", binding, Pry.eval_path)
end
end
end end
# Assert that a line which ends with a , is incomplete. # Assert that a line which ends with a , is incomplete.