#!/usr/local/bin/ruby class Null end NULL = Null.new NULL.freeze verbose = $VERBOSE $VERBOSE = nil NULL.methods.each do |m| Null.class_eval { undef_method m } end $VERBOSE = verbose Object.send :remove_const, :Null def null() NULL end if __FILE__ == $0 puts "RUBY_VERSION = #{RUBY_VERSION}" def try p caller begin yield rescue => ex p ex end end try { p null } try { p +null } try { p !!null } try { p "#{null}" } try { p null.equal? null } try { p null.class } try { p null.methods } try { p Marshal.dump(null) } try { h = {:null => null} p h.keys p h } try { h = {null => :null} p h.values p h } try { def null.yes true end p null.yes } end