Skip to content
This repository

Colorizes Ruby inspects / Don't use an irb without wirb!

tree: 9c99bf67ea

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG.rdoc
Octocat-spinner-32 COPYING
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 wirb.gemspec

Wavy Interactive Ruby

Wirb colorizes your inspected Ruby objects. It is based on Wirble, but only provides result highlighting.

It fixes some displaying bugs and extends the original tokenizer.


Install the gem with:

gem install wirb


Add to your ~/.irbrc

require 'rubygems' unless defined? Gem
require 'wirb'

Improvements and fixed Wirble bugs

  • Basic support for regexes (Wirble displayed them as keywords)

  • Support for generic objects, especially sets and enumerators

  • Fixes some symbol bugs (e.g. :+, :*, …)

  • Does not change the inspect value (e.g. ranges with 4 instead of 3 dots)

  • Comes with tests

  • Can be used without irb


The color schema can be changed with:

Wirb.schema = { :comma => :purple, ... }

Wirb color schemas are (almost) compatible with those from the original Wirble, but there are many extensions. Take a look at wirb/schema.rb or </tt>Wirb.schema</tt> for a list of available token descriptions. See wirb/colors.rb or Wirb::COLORS for the available colors.

Color schemas wanted! You've got a good looking alternative color schema? Please post it on the wiki, it may be bundled with a next version ;)


You can colorize any object with wp (wavy_print):

require 'wirb/wp'
wp some_object
wp some_object, :light_red

Also see


Copyright © 2011 Jan Lelis <>, see COPYING for details.

Contains code from (and thanks to)

  • Copyright (C) 2006-2009 Paul Duncan <>


Something went wrong with that request. Please try again.