main icon indicating copy to clipboard operation
main copied to clipboard

exit_*! don't exit

Open artm opened this issue 12 years ago • 1 comments

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
  }
}

artm avatar Mar 16 '13 13:03 artm

in fact those methods aren't defined, so they must come from fattr and just reset the codes to their default values. Documentation fail?

artm avatar Mar 16 '13 13:03 artm