Ruby-1.9でutility_belt
かなり便利な gem utility_belt ですが、Ruby1.9系で使えません。(utility_belt-1.1.0)
$ irb -r utility_belt /usr/local/lib/ruby/gems/1.9.1/gems/utility_belt-1.1.0/lib/utility_belt.rb:16: in `block in <top (required)>': wrong number of arguments (1 for 0) (ArgumentError) from /usr/local/lib/ruby/1.9.1/irb.rb:61:in `call' from /usr/local/lib/ruby/1.9.1/irb.rb:61:in `start' from /usr/local/bin/irb:12:in `<main>'
gems/utility_belt-1.1.0/lib/utility_belt.rb を以下のように修正すると使えます。
--- utility_belt.rb.old +++ utility_belt.rb @@ -12,7 +12,7 @@ # Called when the irb session is ready, after any external libraries have been loaded. This # allows the user to specify which gadgets in the utility belt to equip. (Kind of pushing the # metaphor, but hey, what the hell.) - IRB.conf[:IRB_RC] = lambda do + IRB.conf[:IRB_RC] = lambda do |v| UtilityBelt.equip(:defaults) unless UtilityBelt.equipped? UTILITY_BELT_IRB_STARTUP_PROCS.each {|symbol, proc| proc.call} end