backport_yield_self 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/backport_yield_self/backport_yield_self.c +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c58d6f35db6bbb05bf28dfc31687ccb385e10c55
|
4
|
+
data.tar.gz: e42d584e32985eec1439648dcf80bae1b0288afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43f0192702edf122c1ac6c378f6015810356e851cb338b2345042d9ad27b98a8d5200fe6dba10db8276b2ac33227575e53ee930e79f4d4ca7c18037f7089ff3f
|
7
|
+
data.tar.gz: 06c9fefa0f5cfd29404fff17425dd3b964fbc907b4a554a802a9b1694da19335260452be9218530041baaab793b39055daf230945289666c807ca4e1cee73919
|
@@ -31,11 +31,12 @@ rb_obj_hide(VALUE obj)
|
|
31
31
|
/*
|
32
32
|
* call-seq:
|
33
33
|
* obj.yield_self {|x| block } -> an_object
|
34
|
+
* obj.then {|x| block } -> an_object
|
34
35
|
*
|
35
36
|
* Yields self to the block and returns the result of the block.
|
36
37
|
*
|
37
|
-
* "my string".yield_self {|s| s.upcase } #=> "MY STRING"
|
38
38
|
* 3.next.yield_self {|x| x**x }.to_s #=> "256"
|
39
|
+
* "my string".yield_self {|s| s.upcase } #=> "MY STRING"
|
39
40
|
*
|
40
41
|
*/
|
41
42
|
|
@@ -55,4 +56,5 @@ Init_backport_yield_self(void)
|
|
55
56
|
rb_mKernel = rb_define_module("Kernel");
|
56
57
|
|
57
58
|
rb_define_method(rb_mKernel, "yield_self", rb_obj_yield_self, 0);
|
59
|
+
rb_define_method(rb_mKernel, "then", rb_obj_yield_self, 0);
|
58
60
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backport_yield_self
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi ITO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hoe
|