.irbrc reloaded

written by zsombor on September 2nd, 2005 @ 03:10 PM

I’ll squash yet another bug in an instance.

Fnords are not to be blamed for my script/server throwing an error on every request. Rather a mistake from my part in .irbrc file published before. So here comes the new shiny corrected version enabling you to do tab completion and auto indentation on an IRB prompt:

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = []  unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
  IRB.conf[:LOAD_MODULES] << 'irb/completion'
end

On a side note perhaps I should look at WEBrick’s output more frequently.

Post a comment

Options:

Size

Colors