Sha256: ed633bde5e73a5d8fec5bf11242c6a9dabf63ee7e12d645bf5722155c6ee7b7c

Contents?: true

Size: 302 Bytes

Versions: 23

Compression:

Stored size: 302 Bytes

Contents

begin
  JSON.parse("test")
rescue Exception => e
  JSON.class_eval do
    class << self
      alias old_parse parse
    end
    def self.parse(*args, &block)
      old_parse(*args, &block)
    rescue Exception => e
      raise StandardError.new e.message
    end
  end unless e.is_a? StandardError
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
hyper-mesh-1.0.0.lap24 lib/opal/parse_patch.rb
hyper-mesh-1.0.0.lap23 lib/opal/parse_patch.rb
hyper-mesh-1.0.0.lap22 lib/opal/parse_patch.rb