backports 1.16.6 → 1.16.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/backports.gemspec +2 -2
- data/lib/backports/1.8.7/argf.rb +3 -14
- data/lib/backports/1.8.7/io.rb +4 -16
- metadata +3 -3
data/VERSION.yml
CHANGED
data/backports.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{backports}
|
8
|
-
s.version = "1.16.
|
8
|
+
s.version = "1.16.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marc-Andr\303\251 Lafortune"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-05-03}
|
13
13
|
s.description = %q{ Essential backports that enable some of the really nice features of ruby 1.8.7, ruby 1.9 and rails from ruby 1.8.6 and earlier.
|
14
14
|
}
|
15
15
|
s.email = %q{github@marc-andre.ca}
|
data/lib/backports/1.8.7/argf.rb
CHANGED
@@ -6,16 +6,6 @@ if RUBY_VERSION < '1.8.7'
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class << ARGF
|
9
|
-
# No official documentation...
|
10
|
-
def bytes
|
11
|
-
to_enum :each_byte
|
12
|
-
end unless method_defined? :bytes
|
13
|
-
|
14
|
-
# No official documentation...
|
15
|
-
def chars
|
16
|
-
to_enum :each_char
|
17
|
-
end unless method_defined? :chars
|
18
|
-
|
19
9
|
# No official documentation...
|
20
10
|
def each_char
|
21
11
|
return to_enum(:each_char) unless block_given?
|
@@ -50,8 +40,7 @@ class << ARGF
|
|
50
40
|
# No official documentation...
|
51
41
|
Backports.alias_method self, :readbyte, :readchar
|
52
42
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end unless method_defined? :lines
|
43
|
+
Backports.alias_method self, :bytes, :each_byte
|
44
|
+
Backports.alias_method self, :chars, :each_char
|
45
|
+
Backports.alias_method self, :lines, :each_line
|
57
46
|
end
|
data/lib/backports/1.8.7/io.rb
CHANGED
@@ -6,17 +6,6 @@ class IO
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
-
# Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/IO.html]
|
10
|
-
def bytes
|
11
|
-
to_enum :each_byte
|
12
|
-
end unless method_defined? :bytes
|
13
|
-
|
14
|
-
# Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/IO.html]
|
15
|
-
def chars
|
16
|
-
to_enum :each_char
|
17
|
-
end unless method_defined? :chars
|
18
|
-
|
19
|
-
# Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/IO.html]
|
20
9
|
def each_char
|
21
10
|
return to_enum(:each_char) unless block_given?
|
22
11
|
if $KCODE == "UTF-8"
|
@@ -44,12 +33,11 @@ class IO
|
|
44
33
|
self
|
45
34
|
end unless method_defined? :each_char
|
46
35
|
|
36
|
+
Backports.alias_method self, :bytes, :each_byte
|
37
|
+
Backports.alias_method self, :chars, :each_char
|
38
|
+
Backports.alias_method self, :lines, :each_line
|
39
|
+
|
47
40
|
Backports.alias_method self, :getbyte, :getc
|
48
41
|
Backports.alias_method self, :readbyte, :readchar
|
49
|
-
|
50
|
-
# Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/IO.html]
|
51
|
-
def lines(*args)
|
52
|
-
to_enum :each_line, *args
|
53
|
-
end unless method_defined? :lines
|
54
42
|
end
|
55
43
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 16
|
8
|
-
-
|
9
|
-
version: 1.16.
|
8
|
+
- 7
|
9
|
+
version: 1.16.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Marc-Andr\xC3\xA9 Lafortune"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-03 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|