Sha256: e16e12690caebdc2e1089e149ce9664055d7568e08df1b37278e905d627eb6c0

Contents?: true

Size: 408 Bytes

Versions: 20

Compression:

Stored size: 408 Bytes

Contents

# these are to backport methods from 1.8.7/1.9.1 to 1.8.6

class Object

  unless method_defined?(:tap)
    def tap
      yield self
      self
    end
  end

end

class String



  unless method_defined?(:bytesize)
    def bytesize
      self.size
    end
  end

  unless method_defined?(:bytes)
    def bytes
      require 'enumerator'
      Enumerable::Enumerator.new(self, :each_byte)
    end
  end

end

Version data entries

20 entries across 18 versions & 7 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/oauth-0.5.1/lib/oauth/core_ext.rb
tdiary-5.0.5 vendor/bundle/gems/oauth-0.5.1/lib/oauth/core_ext.rb
tdiary-5.0.4 vendor/bundle/gems/oauth-0.5.1/lib/oauth/core_ext.rb
oauth-0.5.1 lib/oauth/core_ext.rb
oauth-0.5.0 lib/oauth/core_ext.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/oauth-0.4.7/lib/oauth/core_ext.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/oauth-0.4.7/lib/oauth/core_ext.rb
oauth-ap-0.4.8 lib/oauth/core_ext.rb
oauth-instructure-0.4.10 lib/oauth/core_ext.rb
oauth_weshays-0.4.8.pre2 lib/oauth/core_ext.rb
oauth_weshays-0.4.8.pre lib/oauth/core_ext.rb
oauth-instructure-0.4.9 lib/oauth/core_ext.rb
oauth-instructure-0.4.8 lib/oauth/core_ext.rb
oauth-0.4.7 lib/oauth/core_ext.rb
motionbox-oauth-0.4.5 lib/oauth/core_ext.rb
oauth-0.4.6 lib/oauth/core_ext.rb
oauth-0.4.5 lib/oauth/core_ext.rb
sayso-oauth-0.4.4.001 lib/oauth/core_ext.rb
oauth-0.4.4 lib/oauth/core_ext.rb
oauth-0.4.3 lib/oauth/core_ext.rb