supplement 2.29 → 2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/supplement.c +12 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d98b193bc4d1cc8ede4e690103285660b92acbef10bc2c8c9fbe9774968b55e
4
- data.tar.gz: ce38aef42ac4a5aceb953eee5090d62b09da647c6badd39eb13fcf6ae75124d7
3
+ metadata.gz: fd387c214f1666040ad8c1d4844543310d0616449c08cf3b69a3f11cdc83e93a
4
+ data.tar.gz: 1b5460d3ecf411e6c7cda40510a8649f8ecd9a42ea405d1284f4b3d57148fa9d
5
5
  SHA512:
6
- metadata.gz: c8a1ca6542111abec4919e6b0fafbc665e88baf3de003ccb696586060b4508f0d8c95c5a85d5b2b2bbab85aad0f2c7132bee0458dd64f799d6825c8f404e6754
7
- data.tar.gz: 30703341388fdd2895f68879925eef1d4a1e94c22e177470cc7689b5e7a0addd5693bab20969afa8b127e6a137e5794dba323bdf2d1e2824adfe73b813103dc5
6
+ metadata.gz: 513e9ff98266e00ef2ee11f47961cadb834074a7c7d889708032c14515aaf2db28d95a593d25d6904a66d29f030b4cb9e65219152ae88b6cca9b9a532a60c260
7
+ data.tar.gz: c8c0be3cff0f29e4d5476f694d78f44105222b58f8e86ac37977567a6b702efe65bc0b9f2d5a0dbf4288761b348231cea62fe6ce90f00c964dcd73fff2d9180a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # supplement 2.29 -- Useful Ruby enhancements
1
+ # supplement 2.30 -- Useful Ruby enhancements
2
2
 
3
3
  Some simple Ruby extensions.
4
4
 
data/lib/supplement.c CHANGED
@@ -111,8 +111,10 @@ rb_krn_tap_bang( VALUE obj)
111
111
  * call-seq:
112
112
  * with { |x| ... } -> obj
113
113
  *
114
+ * Warning. This method will be removed. Use +Kernel#then+ instead.
115
+ *
114
116
  * Yields +x+ to the block.
115
- * This difference to +tap+ is that the block's result will be returned.
117
+ * The difference to +tap+ is that the block's result will be returned.
116
118
  *
117
119
  * Use this to narrow your namespace.
118
120
  *
@@ -121,6 +123,8 @@ rb_krn_tap_bang( VALUE obj)
121
123
  VALUE
122
124
  rb_krn_with( VALUE obj)
123
125
  {
126
+ rb_category_warning(RB_WARN_CATEGORY_DEPRECATED,
127
+ "Kernel#with will be removed from the supplement gem. Use Kernel#then instead.");
124
128
  return rb_yield( obj);
125
129
  }
126
130
 
@@ -443,7 +447,7 @@ rb_str_axe( int argc, VALUE *argv, VALUE str)
443
447
  *
444
448
  * "sys-apps".starts_with?( "sys-") #=> 4
445
449
  *
446
- * Caution! The Ruby 1.9.3 method #start_with? (notice the missing s)
450
+ * Caution! The Ruby 1.9.3 method #start_with? (note the missing s)
447
451
  * just returns +true+ or +false+. Mnemonics: "s" = prepare for
448
452
  * <code>#slice</code>.
449
453
  */
@@ -485,7 +489,7 @@ rb_str_starts_with_p( int argc, VALUE *argv, VALUE str)
485
489
  *
486
490
  * "sys-apps".ends_with?( "-apps") #=> 3
487
491
  *
488
- * Caution! The Ruby 1.9.3 method #start_with? (notice the missing s)
492
+ * Caution! The Ruby 1.9.3 method #start_with? (note the missing s)
489
493
  * just returns +true+ or +false+.
490
494
  */
491
495
 
@@ -525,7 +529,7 @@ rb_str_ends_with_p( int argc, VALUE *argv, VALUE str)
525
529
  *
526
530
  * :"sys-apps".starts_with?( "sys-") #=> 4
527
531
  *
528
- * Caution! The Ruby 1.9.3 method #start_with? (notice the missing s)
532
+ * Caution! The Ruby 1.9.3 method #start_with? (note the missing s)
529
533
  * just returns +true+ or +false+. Mnemonics: "s" = prepare for
530
534
  * <code>#slice</code>.
531
535
  */
@@ -546,7 +550,7 @@ rb_sym_starts_with_p( int argc, VALUE *argv, VALUE sym)
546
550
  *
547
551
  * :"sys-apps".ends_with?( "-apps") #=> 3
548
552
  *
549
- * Caution! The Ruby 1.9.3 method #start_with? (notice the missing s)
553
+ * Caution! The Ruby 1.9.3 method #start_with? (note the missing s)
550
554
  * just returns +true+ or +false+.
551
555
  */
552
556
 
@@ -1202,12 +1206,15 @@ void Init_supplement( void)
1202
1206
 
1203
1207
  rb_define_method( rb_cHash, "notempty?", rb_hash_notempty_p, 0);
1204
1208
 
1209
+ rb_undef_method( rb_singleton_class( rb_cFile), "umask");
1205
1210
  rb_define_singleton_method( rb_cFile, "umask", rb_file_s_umask, -1);
1206
1211
 
1207
1212
  rb_define_singleton_method( rb_cDir, "current", rb_dir_s_current, 0);
1208
1213
  rb_define_singleton_method( rb_cDir, "mkdir!", rb_dir_s_mkdir_bang, -1);
1209
1214
  rb_define_alias( rb_cDir, "entries!", "children");
1210
1215
 
1216
+ rb_undef_method( rb_cMatch, "begin");
1217
+ rb_undef_method( rb_cMatch, "end");
1211
1218
  rb_define_method( rb_cMatch, "begin", rb_match_begin, -1);
1212
1219
  rb_define_method( rb_cMatch, "end", rb_match_end, -1);
1213
1220
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supplement
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.29'
4
+ version: '2.30'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf