supplement 2.3.1 → 2.4
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 +4 -4
- data/LICENSE +1 -1
- data/README +1 -1
- data/lib/supplement.c +17 -0
- data/lib/supplement.h +1 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5f88b0474c869e526bfd16b7e5722c807def120fd4a77a7e18c8a553e39a649
|
4
|
+
data.tar.gz: 9e4272c52c2f0147e4c85540d42d155fc2c1843c8513d4370e5de130b4baf2f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57cc21c7b672bd54a34bb65766d80f33f16e053821078ec21467a110836d54b589efc708a3fefc9897320e7707816cb0864c089f5bd411056b3f81b413d1ca11
|
7
|
+
data.tar.gz: 375e9c694c1c841994def2b00ce446dc3cd81509b707cc9169a580714b178da68f66cad9ee22ce9629665b0bc7456c8764a5c6be961fab94dea927e47c11c575
|
data/LICENSE
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|___/\__,_| .__/| .__/|_|\___|_| |_| |_|\___|_| |_|\__|
|
6
6
|
|_| |_|
|
7
7
|
|
8
|
-
Copyright (C) 2009-
|
8
|
+
Copyright (C) 2009-2019, Bertram Scharpf <software@bertram-scharpf.de>.
|
9
9
|
All rights reserved.
|
10
10
|
|
11
11
|
Redistribution and use in source and binary forms, with or without
|
data/README
CHANGED
data/lib/supplement.c
CHANGED
@@ -857,6 +857,22 @@ rb_ary_notempty_p( VALUE ary)
|
|
857
857
|
}
|
858
858
|
|
859
859
|
|
860
|
+
/*
|
861
|
+
* call-seq:
|
862
|
+
* range() -> range
|
863
|
+
*
|
864
|
+
* Returns the range <code>0...size</code>.
|
865
|
+
*
|
866
|
+
* [ "a", "h", "q"].range #=> 0...3
|
867
|
+
*/
|
868
|
+
|
869
|
+
VALUE
|
870
|
+
rb_ary_range( VALUE ary)
|
871
|
+
{
|
872
|
+
return rb_range_new( INT2FIX( 0), INT2FIX( RARRAY_LEN( ary)), 1);
|
873
|
+
}
|
874
|
+
|
875
|
+
|
860
876
|
/*
|
861
877
|
* call-seq:
|
862
878
|
* indexes() -> ary
|
@@ -1516,6 +1532,7 @@ void Init_supplement( void)
|
|
1516
1532
|
rb_define_method( rb_cArray, "notempty?", rb_ary_notempty_p, 0);
|
1517
1533
|
rb_define_method( rb_cArray, "indexes", rb_ary_indexes, 0);
|
1518
1534
|
rb_define_alias( rb_cArray, "keys", "indexes");
|
1535
|
+
rb_define_method( rb_cArray, "range", rb_ary_range, 0);
|
1519
1536
|
rb_define_method( rb_cArray, "pick", rb_ary_pick, -1);
|
1520
1537
|
rb_define_method( rb_cArray, "rpick", rb_ary_rpick, -1);
|
1521
1538
|
#ifdef FEATURE_ARRAY_INDEX_WITH_BLOCK
|
data/lib/supplement.h
CHANGED
@@ -44,6 +44,7 @@ extern VALUE rb_str_axe( int, VALUE *, VALUE);
|
|
44
44
|
|
45
45
|
extern VALUE rb_ary_notempty_p( VALUE);
|
46
46
|
extern VALUE rb_ary_indexes( VALUE);
|
47
|
+
extern VALUE rb_ary_range( VALUE);
|
47
48
|
extern VALUE rb_ary_pick( int, VALUE *, VALUE);
|
48
49
|
extern VALUE rb_ary_rpick( int, VALUE *, VALUE);
|
49
50
|
#ifdef FEATURE_ARRAY_INDEX_WITH_BLOCK
|
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: supplement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: '2.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autorake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2
|
19
|
+
version: '2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2
|
26
|
+
version: '2'
|
27
27
|
description: 'Simple methods that didn''t manage to become part of standard Ruby.
|
28
28
|
|
29
|
-
'
|
29
|
+
'
|
30
30
|
email: "<software@bertram-scharpf.de>"
|
31
31
|
executables: []
|
32
32
|
extensions:
|
@@ -55,7 +55,8 @@ files:
|
|
55
55
|
- lib/supplement/terminal.c
|
56
56
|
- lib/supplement/terminal.h
|
57
57
|
homepage: http://www.bertram-scharpf.de/software/supplement
|
58
|
-
licenses:
|
58
|
+
licenses:
|
59
|
+
- BSD-2-Clause
|
59
60
|
metadata: {}
|
60
61
|
post_install_message:
|
61
62
|
rdoc_options:
|
@@ -77,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
78
|
version: '0'
|
78
79
|
requirements:
|
79
80
|
- Ruby and the autorake gem
|
80
|
-
|
81
|
-
rubygems_version: 2.7.8
|
81
|
+
rubygems_version: 3.0.3
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Simple Ruby extensions
|