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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9897cbadd93db0f224abbabf0056acc58d110643
4
- data.tar.gz: b23435e0bb0efb2b2626bf462da5e8c5435f454e
3
+ metadata.gz: c58d6f35db6bbb05bf28dfc31687ccb385e10c55
4
+ data.tar.gz: e42d584e32985eec1439648dcf80bae1b0288afc
5
5
  SHA512:
6
- metadata.gz: 861ca0cb16b841d115f2cb6574fc843fb3b09f4e91982029533b87958515c810cbb60e1eb77d7b401c68f88651e2d45803dc7087b23f0597ebfbea7a952195af
7
- data.tar.gz: 2c9a47b5083200bd614fc2c9ee5220e045aace0162a9705e06a62dabe2311f3d982c64001237389600719281f5f11383c54b40787fb622ffad4d551360ae232b
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: 1.0.0
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-01-27 00:00:00.000000000 Z
11
+ date: 2018-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hoe