Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
XMP.new
new(bind = nil)
lib/irb/xmp.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/irb/xmp.rb, line 49
def initialize(bind = nil)
IRB.init_config(nil)
IRB.conf[:PROMPT_MODE] = :XMP
bind = IRB::Frame.top(1) unless bind
ws = IRB::WorkSpace.new(bind)
@io = StringInputMethod.new
@irb = IRB::Irb.new(ws, @io)
@irb.context.ignore_sigint = false
IRB.conf[:MAIN_CONTEXT] = @irb.context
end
Creates a new XMP object.
The top-level binding or, optional bind parameter will be used when creating the workspace. See WorkSpace.new for more information.
This uses the :XMP prompt mode. See Custom Prompts for more information.