Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
XMP#puts
puts(exps)
lib/irb/xmp.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/irb/xmp.rb, line 74
def puts(exps)
@io.puts exps
if @irb.context.ignore_sigint
begin
trap_proc_b = trap("SIGINT"){@irb.signal_handle}
catch(:IRB_EXIT) do
@irb.eval_input
end
ensure
trap("SIGINT", trap_proc_b)
end
else
catch(:IRB_EXIT) do
@irb.eval_input
end
end
end
Evaluates the given exps, for example:
Example
require 'irb/xmp' x = XMP.new x.puts '{:a => 1, :b => 2, :c => 3}' #=> {:a => 1, :b => 2, :c => 3} # ==>{:a=>1, :b=>2, :c=>3} x.puts 'foo = "bar"' # => foo = "bar" # ==>"bar"