main
main copied to clipboard
exit_*! don't exit
the following program will do the impossible in every mode.
require 'main'
Main {
def run
exit_failure!
puts 'this will not happen'
end
mode('warn'){
def run
exit_warn!
puts 'this will not happen'
end
}
mode('succeede'){
def run
exit_success!
puts 'this will not happen'
end
}
}
in fact those methods aren't defined, so they must come from fattr and just reset the codes to their default values. Documentation fail?