Sha256: d6aad3b59fa953bc9917f3a410745498055152f1d5d9237364d789ada5546cc8
Contents?: true
Size: 536 Bytes
Versions: 2
Compression:
Stored size: 536 Bytes
Contents
require_relative '../lib/mpatch/object' MPatch.patch! try { hello world } catch{ "not hello world " } #> "not hello world" try { "hello world".asdaf } catch( NoMethodError ) { |ex| puts "there is and error, because #{ex}" } #> you can cain up multiple catch for specific error try { "hello world".asdaf } catch( NoMethodError ) { |ex| puts "there is and error, because #{ex}" } try { "hello world".asdaf } catch(ArgumentError) { puts "it was and argument error" } catch( NoMethodError ) { |ex| puts "bla bla #{ex}" }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mpatch-2.8.1 | test/test.rb |
mpatch-2.8.0 | test/test.rb |