Skip to content

Instantly share code, notes, and snippets.

@nahi
Created March 25, 2012 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nahi/2193243 to your computer and use it in GitHub Desktop.
Save nahi/2193243 to your computer and use it in GitHub Desktop.
% ruby -Ilib -d -rrbtree_map -e 'map = RBTreeMap.new; ("a".."e").each { |k| map.put(k, k) }; puts map.dump_tree'
Exception `LoadError' at /usr/local/lib/ruby/2.0.0/rubygems.rb:1243 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /usr/local/lib/ruby/2.0.0/rubygems.rb:1252 - cannot load such file -- rubygems/defaults/ruby
#<RBTreeMap::RBTree:0x00011bce9c BLACK "e"> => "e"
#<RBTreeMap::RBTree:0x00011bcec4 RED "d"> => "d"
#<RBTreeMap::RBTree:0x00011bcf00 BLACK "c"> => "c"
#<RBTreeMap::RBTree:0x00011bcf28 BLACK "b"> => "b"
#<RBTreeMap::RBTree:0x00011bcf50 BLACK "a"> => "a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment