diff options
Diffstat (limited to 'lib/irb.rb')
-rw-r--r-- | lib/irb.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index 0d0f6f4136..1e59d6f669 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -141,10 +141,10 @@ module IRB end end - @scanner.each_top_level_statement do - |line, line_no| + @scanner.each_top_level_statement do |line, line_no| signal_status(:IN_EVAL) do begin + line.untaint @context.evaluate(line, line_no) output_value if @context.echo? rescue StandardError, ScriptError, Abort @@ -180,6 +180,10 @@ module IRB end print "Maybe IRB bug!!\n" if irb_bug end + if $SAFE > 2 + warn "Error: irb does not work for $SAFE level higher than 2" + exit 1 + end end end end |