Sha256: 4e442e309f595c6c068d2ff52234a6b6fcf648c22862f76c08469b5943cc5419

Contents?: true

Size: 620 Bytes

Versions: 12

Compression:

Stored size: 620 Bytes

Contents

unless Object.method_defined?(:__send)
  class Object
    alias __send __send__
  end
end

unless Object.method_defined?(:funcall)
  class Object
    alias funcall __send
  end
end

unless Fixnum.method_defined?(:ord)
  class Fixnum
    def ord
      self
    end
  end
end

unless String.method_defined?(:lines)
  class String
    alias lines to_a
  end
end

unless String.method_defined?(:bytesize)
  class String
    alias bytesize size
  end
end

def fopen(*args, &block)
  option = args[1]
  if option and !Object.const_defined?(:Encoding)
    args[1] = option.sub(/:.*\z/, '')
  end
  File.open(*args, &block)
end

Version data entries

12 entries across 8 versions & 1 rubygems

Version Path
bitclust-core-0.7.0 lib/bitclust/compat.rb
bitclust-core-0.6.0 lib/bitclust/compat.rb
bitclust-core-0.5.5 lib/bitclust/compat.rb
bitclust-core-0.5.4 lib/bitclust/compat.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/lib/bitclust/compat.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/lib/bitclust/compat.rb
bitclust-core-0.5.3 lib/bitclust/compat.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/lib/bitclust/compat.rb
bitclust-core-0.5.2 lib/bitclust/compat.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/lib/bitclust/compat.rb
bitclust-core-0.5.1 lib/bitclust/compat.rb
bitclust-core-0.5.0 lib/bitclust/compat.rb