Module: Kernel

Defined in:
lib/assert.rb,
lib/rubylexer.rb

Overview

defense against my class being redefined by a a certain other project,

Constant Summary collapse

@@printed =
{}

Instance Method Summary collapse

Instance Method Details

#assert(expr, msg = "assertion failed") ⇒ Object



20
21
22
# File 'lib/assert.rb', line 20

def assert(expr,msg="assertion failed")
  defined? $Debug and $Debug and (expr or raise msg)
end

#fixme(s) ⇒ Object



25
26
27
28
29
30
# File 'lib/assert.rb', line 25

def fixme(s)
  unless @@printed[s] 
    @@printed[s]=1
    defined? $Debug and $Debug and $stderr.print "FIXME: #{s}\n"
  end
end