Skip to content

Commit 9e9380b

Browse files
author
Charlie Somerville
committed
remove Object#tap, String#bytesize, and String#bytes extensions
these methods are all defined in ruby 2.0 which is the minimum ruby version required by the oauth gem
1 parent a11909a commit 9e9380b

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

lib/oauth/core_ext.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
1-
# these are to backport methods from 1.8.7/1.9.1 to 1.8.6
2-
3-
class Object
4-
5-
unless method_defined?(:tap)
6-
def tap
7-
yield self
8-
self
9-
end
10-
end
11-
12-
end
13-
14-
class String
15-
16-
unless method_defined?(:bytesize)
17-
def bytesize
18-
self.size
19-
end
20-
end
21-
22-
unless method_defined?(:bytes)
23-
def bytes
24-
require 'enumerator'
25-
Enumerable::Enumerator.new(self, :each_byte)
26-
end
27-
end
28-
29-
end
30-
311
# TODO: Work around URI.escape obsolete method
322
#
333
# 21/May/2016 - We are silencing a warning introduced in 2009

0 commit comments

Comments
 (0)