Sha256: 9c0c5aeb2f366d5107175a50f33bc2262440249bfbfbbaa755e60a6262c55a25

Contents?: true

Size: 691 Bytes

Versions: 30

Compression:

Stored size: 691 Bytes

Contents

class Object
  def singleton_class(object = self, &block)
    singleton_class =
      class << object
        self
      end
    block ? singleton_class.module_eval(&block) : singleton_class
  end
end

module Kernel
private
  undef_method 'abort'
  def abort(message = nil)
    if message
      message = message.to_s
      message.singleton_class{ fattr 'abort' => true }
      STDERR.puts message
    end
    exit 1
  end
end

module Process
  class << Process
    undef_method 'abort'
    def abort(message = nil)
      if message
        message = message.to_s
        message.singleton_class{ fattr 'abort' => true }
        STDERR.puts message
      end
      exit 1
    end
  end
end

Version data entries

30 entries across 29 versions & 2 rubygems

Version Path
main-6.2.0 lib/main/stdext.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/stdext.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/stdext.rb
main-6.1.0 lib/main/stdext.rb
main-6.0.0 lib/main/stdext.rb
main-5.3.2 lib/main/stdext.rb
main-5.3.1 lib/main/stdext.rb
main-5.2.0 lib/main/stdext.rb
main-5.1.1 lib/main/stdext.rb
main-5.1.0 lib/main/stdext.rb
main-5.0.1 lib/main/stdext.rb
main-5.0.0 lib/main/stdext.rb
main-4.8.1 lib/main/stdext.rb
main-4.8.0 lib/main/stdext.rb
main-4.7.7 lib/main/stdext.rb
main-4.7.6 lib/main/stdext.rb
main-4.7.5 lib/main/stdext.rb
main-4.7.4 lib/main/stdext.rb
main-4.7.3 lib/main/stdext.rb
main-4.7.2 lib/main/stdext.rb