lib/irb.rb in irb-1.6.3 vs lib/irb.rb in irb-1.6.4
- old
+ new
@@ -414,15 +414,10 @@
irb = Irb.new
end
irb.run(@CONF)
end
- # Calls each event hook of <code>IRB.conf[:AT_EXIT]</code> when the current session quits.
- def IRB.irb_at_exit
- @CONF[:AT_EXIT].each{|hook| hook.call}
- end
-
# Quits irb
def IRB.irb_exit(irb, ret)
throw :IRB_EXIT, ret
end
@@ -563,11 +558,10 @@
@scanner.set_auto_indent
@scanner.each_top_level_statement do |line, line_no|
signal_status(:IN_EVAL) do
begin
- line.untaint if RUBY_VERSION < '2.7'
if IRB.conf[:MEASURE] && IRB.conf[:MEASURE_CALLBACKS].empty?
IRB.set_measure_callback
end
# Assignment expression check should be done before @context.evaluate to handle code like `a /2#/ if false; a = 1`
is_assignment = assignment_expression?(line)
@@ -895,14 +889,9 @@
node_type = Ripper.sexp(code)&.dig(1)&.drop(1)&.dig(-1, 0)
ASSIGNMENT_NODE_TYPES.include?(node_type)
ensure
$VERBOSE = verbose
end
-
- ATTR_TTY = "\e[%sm"
- def ATTR_TTY.[](*a) self % a.join(";"); end
- ATTR_PLAIN = ""
- def ATTR_PLAIN.[](*) self; end
end
def @CONF.inspect
IRB.version unless self[:VERSION]