Sha256: 22cd18ed015ed668c7850a8d5802798c4696cdff4aded1fa59e179a65a3bdbaf

Contents?: true

Size: 205 Bytes

Versions: 3

Compression:

Stored size: 205 Bytes

Contents

# 1.8.6 doesn't support String#end_with?
unless ''.respond_to?(:end_with?)
  class String
    def end_with?(s)
      ((idx = self.length - s.length) < 0) ? false : (self[idx .. -1] == s)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cross-stub-0.2.4 lib/cross-stub/fixes.rb
cross-stub-0.2.3 lib/cross-stub/fixes.rb
cross-stub-0.2.2 lib/cross-stub/fixes.rb