#!/usr/bin/ruby
require 'irb'
class << STDOUT
def write(s)
$stderr.puts "HERE #{s}"
end
end
IRB.startpigeon% b.rb irb(main):001:0> HERE NameError HERE : HERE undefined local variable or method 'aaa' for #<Object:0x401c6ce0> HERE HERE from (irb):1 HERE irb(main):002:0> HERE pigeon%
Příklad A.2. Z dopisu Hiroshi Nakamury: catch.rb
# $Id: catch.ses,v 1.1 2002/12/16 20:34:12 radek Exp $ruby: no such file to load -- catch (LoadError)sh: line 5: quit: command not found
