supplement 2.10 → 2.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1206a611923d4942aca1f5145fb3a1548b71e54c8673715c300aecda10124b8
4
- data.tar.gz: bf8222831712d9da2da04516f6f164a88af77be4cc21fe2541ff89180455f9f8
3
+ metadata.gz: 3d2e9e61df27643fc4cebe593ba085cbbfb26a3fbcc87094c5a80c9ea10b2cf2
4
+ data.tar.gz: b6d88bb52fe8e8655f2df9d0c567b164fe81f5f1c935f27cfbdfd553201c1116
5
5
  SHA512:
6
- metadata.gz: 84d67ad3aba9681598e54ed70eae410473eb0bdd4c9686d956c1b7277d5a8a3d95294e112174992639e9e1a4cca020eba65a1bf059a033422876e882f4a994e9
7
- data.tar.gz: 5ca80a6eb3a39af49e25bd63400e65c363fe8dad6adf610676b819cbede1cb2af76035fcb71686050a2d9b78bc5c21e5db9f82850e63c83c3e9f7c3681e90d36
6
+ metadata.gz: 87a0fd7dad676d4f8920506c796ca047fbcf4d3ce751377e12b5b5e4174e82e474ef405ded030289dc310a469f5b35eef517ccf00382a44f2626f32f18b63d7a
7
+ data.tar.gz: d023c6da1c77ab1b56acc978da9b107d7a9c76f6988a87ec9babfb2429dd56331ef69dc10ad72bdad86bb53387a5cccb311bb0405e13dc952bac3125482ed3f4
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = supplement 2.10 -- Useful Ruby enhancements
1
+ = supplement 2.13 -- Useful Ruby enhancements
2
2
 
3
3
 
4
4
  Some simple Ruby extensions.
data/lib/mkrf_conf CHANGED
@@ -10,21 +10,25 @@ Autorake.configure {
10
10
 
11
11
  extending_ruby
12
12
 
13
- if RUBY_VERSION < "2.6" then
14
- enable :dir_children
15
- if RUBY_VERSION < "1.9.2" then
16
- enable :array_select_bang
17
- if RUBY_VERSION < "1.9" then
18
- enable :string_ord
19
- enable :string_clear
20
- if RUBY_VERSION < "1.8.7" then
21
- enable :array_index_with_block
22
- enable :kernel_tap
23
- enable :string_start_with
24
- enable :thread_exclusive
13
+ if RUBY_VERSION < "2.7" then
14
+ if RUBY_VERSION < "2.6" then
15
+ enable :dir_children
16
+ if RUBY_VERSION < "1.9.2" then
17
+ enable :array_select_bang
18
+ if RUBY_VERSION < "1.9" then
19
+ enable :string_ord
20
+ enable :string_clear
21
+ if RUBY_VERSION < "1.8.7" then
22
+ enable :array_index_with_block
23
+ enable :kernel_tap
24
+ enable :string_start_with
25
+ enable :thread_exclusive
26
+ end
25
27
  end
26
28
  end
27
29
  end
30
+ else
31
+ enable :super_kwargs
28
32
  end
29
33
 
30
34
  if RUBY_VERSION < "1.9" then
data/lib/process.c CHANGED
@@ -40,7 +40,6 @@ rb_process_renice( int argc, VALUE *argv, VALUE obj)
40
40
  else
41
41
  pid = NUM2INT( p1), prio = NUM2INT( p2);
42
42
 
43
- rb_secure(1);
44
43
  if (setpriority( PRIO_PROCESS, pid, prio) < 0)
45
44
  rb_sys_fail(0);
46
45
 
@@ -42,7 +42,11 @@ rb_locked_init( int argc, VALUE *argv, VALUE self)
42
42
  #endif
43
43
  int op;
44
44
 
45
+ #ifdef FEATURE_SUPER_KWARGS
46
+ rb_call_super_kw(argc, argv, RB_PASS_CALLED_KEYWORDS);
47
+ #else
45
48
  rb_call_super( argc, argv);
49
+ #endif
46
50
  GetOpenFile( self, fptr);
47
51
 
48
52
  op = fptr->mode & FMODE_WRITABLE ? LOCK_EX : LOCK_SH;
@@ -99,15 +99,15 @@ io_reset( VALUE v)
99
99
 
100
100
  /*
101
101
  * call-seq:
102
- * io.winsize() -> ary
102
+ * io.wingeom() -> ary
103
103
  *
104
104
  * Get the available window space.
105
105
  *
106
- * cols, rows, xpixel, ypixel = $stdout.winsize
106
+ * cols, rows, xpixel, ypixel = $stdout.wingeom
107
107
  */
108
108
 
109
109
  VALUE
110
- rb_io_winsize( VALUE self)
110
+ rb_io_wingeom( VALUE self)
111
111
  {
112
112
  #ifndef RUBY_VM
113
113
  OpenFile *fptr;
@@ -139,6 +139,6 @@ rb_io_winsize( VALUE self)
139
139
  void Init_terminal( void)
140
140
  {
141
141
  rb_define_method( rb_cIO, "unget", rb_io_unget, -1);
142
- rb_define_method( rb_cIO, "winsize", rb_io_winsize, 0);
142
+ rb_define_method( rb_cIO, "wingeom", rb_io_wingeom, 0);
143
143
  }
144
144
 
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
  extern VALUE rb_io_unget( int, VALUE *, VALUE);
16
- extern VALUE rb_io_winsize( VALUE);
16
+ extern VALUE rb_io_wingeom( VALUE);
17
17
 
18
18
  extern void Init_terminal( void);
19
19
 
data/lib/supplement.c CHANGED
@@ -1244,11 +1244,10 @@ rb_file_size( VALUE obj)
1244
1244
  */
1245
1245
 
1246
1246
  VALUE
1247
- rb_file_s_umask( int argc, VALUE *argv)
1247
+ rb_file_s_umask( int argc, VALUE *argv, VALUE file)
1248
1248
  {
1249
1249
  int omask = 0;
1250
1250
 
1251
- rb_secure( 1);
1252
1251
  switch (argc) {
1253
1252
  case 0:
1254
1253
  omask = umask( 0777);
@@ -1309,7 +1308,7 @@ rb_dir_s_current( VALUE dir)
1309
1308
  */
1310
1309
 
1311
1310
  VALUE
1312
- rb_dir_s_mkdir_bang( int argc, VALUE *argv)
1311
+ rb_dir_s_mkdir_bang( int argc, VALUE *argv, VALUE dir)
1313
1312
  {
1314
1313
  VALUE path, modes;
1315
1314
 
@@ -1319,7 +1318,7 @@ rb_dir_s_mkdir_bang( int argc, VALUE *argv)
1319
1318
 
1320
1319
  parent[ 0] = rb_file_dirname( path);
1321
1320
  parent[ 1] = modes;
1322
- rb_dir_s_mkdir_bang( 2, parent);
1321
+ rb_dir_s_mkdir_bang( 2, parent, dir);
1323
1322
  if (!id_mkdir)
1324
1323
  id_mkdir = rb_intern( "mkdir");
1325
1324
  if (NIL_P(modes))
data/lib/supplement.h CHANGED
@@ -15,7 +15,9 @@
15
15
 
16
16
  extern VALUE rb_obj_new_string( VALUE);
17
17
  extern VALUE rb_obj_nil_if( VALUE, VALUE);
18
+ #ifdef FEATURE_KERNEL_TAP
18
19
  extern VALUE rb_krn_tap( VALUE);
20
+ #endif
19
21
  extern VALUE rb_krn_tap_bang( VALUE);
20
22
  extern VALUE rb_krn_with( VALUE);
21
23
 
@@ -65,9 +67,9 @@ extern VALUE rb_num_cbrt( VALUE);
65
67
  extern VALUE rb_hash_notempty_p( VALUE);
66
68
 
67
69
  extern VALUE rb_file_size( VALUE);
68
- extern VALUE rb_file_s_umask( int, VALUE *);
70
+ extern VALUE rb_file_s_umask( int, VALUE *, VALUE);
69
71
  extern VALUE rb_dir_s_current( VALUE);
70
- extern VALUE rb_dir_s_mkdir_bang( int, VALUE *);
72
+ extern VALUE rb_dir_s_mkdir_bang( int, VALUE *, VALUE);
71
73
  extern VALUE rb_dir_children( VALUE);
72
74
 
73
75
  extern VALUE rb_match_begin( int, VALUE *, VALUE);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supplement
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.10'
4
+ version: '2.13'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-13 00:00:00.000000000 Z
11
+ date: 2022-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autorake
@@ -59,7 +59,7 @@ homepage: http://www.bertram-scharpf.de/software/supplement
59
59
  licenses:
60
60
  - BSD-2-Clause
61
61
  metadata: {}
62
- post_install_message:
62
+ post_install_message:
63
63
  rdoc_options:
64
64
  - "--charset"
65
65
  - utf-8
@@ -79,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements:
81
81
  - Ruby and the autorake gem
82
- rubygems_version: 3.0.6
83
- signing_key:
82
+ rubygems_version: 3.0.8
83
+ signing_key:
84
84
  specification_version: 4
85
85
  summary: Simple Ruby extensions
86
86
  test_files: []