xqsr3 0.39.8 → 0.39.9
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/CHANGES.md +21 -3
- data/CONTRIBUTING.md +36 -0
- data/EXAMPLES.md +1 -1
- data/FAQ.md +28 -0
- data/INSTALL.md +41 -0
- data/NEWS.md +1 -0
- data/README.md +5 -2
- data/SECURITY.md +23 -0
- data/TODO.md +4 -3
- data/lib/xqsr3/array_utilities/join_with_or.rb +2 -2
- data/lib/xqsr3/command_line_utilities/map_option_string.rb +2 -2
- data/lib/xqsr3/containers/frequency_map.rb +2 -2
- data/lib/xqsr3/containers/multi_map.rb +2 -2
- data/lib/xqsr3/conversion/bool_parser.rb +2 -2
- data/lib/xqsr3/conversion/integer_parser.rb +2 -2
- data/lib/xqsr3/diagnostics/exception_utilities.rb +2 -2
- data/lib/xqsr3/diagnostics/exceptions/with_cause.rb +2 -2
- data/lib/xqsr3/diagnostics/inspect_builder.rb +2 -2
- data/lib/xqsr3/doc_.rb +2 -2
- data/lib/xqsr3/extensions/enumerable/collect_with_index.rb +2 -2
- data/lib/xqsr3/extensions/enumerable/detect_map.rb +2 -2
- data/lib/xqsr3/extensions/enumerable/unique.rb +2 -2
- data/lib/xqsr3/extensions/integer/to_s_grp.rb +2 -2
- data/lib/xqsr3/extensions/io/writelines.rb +2 -2
- data/lib/xqsr3/extensions/kernel/integer.rb +2 -2
- data/lib/xqsr3/extensions/kernel/raise_with_options.rb +2 -2
- data/lib/xqsr3/hash_utilities/deep_transform.rb +2 -2
- data/lib/xqsr3/hash_utilities/key_matching.rb +2 -2
- data/lib/xqsr3/internal_/test_ruby_version_.rb +2 -2
- data/lib/xqsr3/internal_/test_unit_version_.rb +2 -2
- data/lib/xqsr3/io/writelines.rb +15 -6
- data/lib/xqsr3/quality/parameter_checking.rb +2 -2
- data/lib/xqsr3/string_utilities/ends_with.rb +2 -2
- data/lib/xqsr3/string_utilities/nil_if_empty.rb +2 -2
- data/lib/xqsr3/string_utilities/nil_if_whitespace.rb +2 -2
- data/lib/xqsr3/string_utilities/quote_if.rb +2 -2
- data/lib/xqsr3/string_utilities/starts_with.rb +2 -2
- data/lib/xqsr3/string_utilities/to_symbol.rb +2 -2
- data/lib/xqsr3/string_utilities/truncate.rb +2 -2
- data/lib/xqsr3/version.rb +3 -3
- data/test/unit/extensions/io/tc_writelines.rb +25 -16
- data/test/unit/io/tc_writelines.rb +22 -12
- data/test/unit/quality/tc_parameter_checking.rb +6 -6
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfce28587b77a393e2c0a15d21fc82bc78adfbcf8815fe0d77e37af3e1653e16
|
|
4
|
+
data.tar.gz: 2befb6452ea13b944cb8e88eb77fedb3e8b31da84c4c1b8948fc479c271967aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c1ba16f20398a85c7acf16a2782f87b76ca9c433ce0f3f8cc9f19960979f40865b139382b7c1f6af2eb2ed78c96a7005956b83edd06aed55abe4d38229e8f67
|
|
7
|
+
data.tar.gz: 3d66276512e30b758f5a54f83187f3fbfd3f0d5b88f2dc2c70ebb12e62201cb7ac7a0fd91ac70088dc5aff0d259f56f19603c690ba46efb75dae6be9cd323d7e
|
data/CHANGES.md
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
# xqsr3 - Changes <!-- omit in toc -->
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## 0.39.9 - 21st August 2026
|
|
5
|
+
|
|
6
|
+
* `IO.writelines` writes via `<<` of `to_s` fragments instead of interpolating into frozen strings (Ruby 3.4+ `-W`);
|
|
7
|
+
* writelines unit tests use a local `writable_stringio` helper (`String.new` buffer, not `+''`) so **StringIO** is writable on Ruby 2.0 through 3.4+;
|
|
8
|
+
* **test/unit/quality/tc_parameter_checking.rb**: `check_method_2` forwards the validation block; `assert_nil` / `assert_not_nil` invocations wrapped so **test-unit** does not warn under Ruby 3.4;
|
|
9
|
+
* library source **Home:** URLs now use `https`;
|
|
10
|
+
* **EXAMPLES.md** example links are repo-relative (`./examples/…`);
|
|
11
|
+
* updated **README.md** afferent (fan-in) dependent lists;
|
|
12
|
+
* expanded **xqsr3.gemspec** `spec.summary` to the README tagline; packaged **CONTRIBUTING**, **FAQ**, **INSTALL**, and **SECURITY**;
|
|
13
|
+
* updated **run_all_unit_tests.sh** (from https://github.com/synesissoftware/misc-dev-scripts) to skip **tput** when **$TERM** is unset or stdout is not a TTY;
|
|
14
|
+
* CI **Warnings** job now runs on Ruby **3.4**;
|
|
15
|
+
* stop tracking **Gemfile.lock** (already gitignored); **Gemfile** sets `lockfile false` when Bundler supports it; CI uses `bundler-cache: false` because Bundler 4 then writes no lockfile and **ruby/setup-ruby** cache cats **Gemfile.lock**;
|
|
16
|
+
* **xqsr3.gemspec**: `required_ruby_version` is the range `>= 2.0`; **Gemfile.lock** and **.ruby-version** excluded from `spec.files`;
|
|
17
|
+
* TODO: CI `on.push.branches` is the canonical seven names (dropped **bp-3**);
|
|
18
|
+
|
|
19
|
+
|
|
4
20
|
## 0.39.8 - 20th August 2026
|
|
5
21
|
|
|
6
22
|
* added `# frozen_string_literal: true` to all **lib/** sources;
|
|
23
|
+
* **Rakefile**: `# frozen_string_literal: true` and `test` on the load path;
|
|
24
|
+
* polished **xqsr3.gemspec** (standard File/Purpose/Created/Updated banner; multi-line `authors` / `email`);
|
|
7
25
|
* added **.editorconfig**;
|
|
8
|
-
* **.gitattributes**: **Gemfile.lock** is now a normal text file (no longer `-diff`); regenerated lockfile with path gem and **rake** / **test-unit** pins;
|
|
9
26
|
* added **.github/dependabot.yml** (bundler and GitHub Actions, weekly);
|
|
10
|
-
*
|
|
27
|
+
* **.gitattributes**: **Gemfile.lock** is now a normal text file (no longer `-diff`); regenerated lockfile with path gem and **rake** / **test-unit** pins;
|
|
28
|
+
* updated CI in **.github/workflows/ruby.yml** (`rc1`/`rc2`/`rc3` branch triggers; `fail-fast: false`; default `bash` shell; remove **Gemfile.lock** before `setup-ruby`);
|
|
11
29
|
* added **CONTRIBUTING.md**, **INSTALL.md**, and **SECURITY.md**; populated **FAQ.md**;
|
|
12
30
|
* reformatted **AUTHORS.md** as tables;
|
|
13
31
|
* backfilled historical **NEWS.md** release rows and **CHANGES.md** version entries;
|
|
14
|
-
* **
|
|
32
|
+
* updated **Gemfile** dependency quote style (double-quoted gem names, single-quoted constraints);
|
|
15
33
|
|
|
16
34
|
|
|
17
35
|
## 0.39.7 - 19th August 2026
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# xqsr3 - Contributing <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Defects and features](#defects-and-features)
|
|
7
|
+
- [Pull requests](#pull-requests)
|
|
8
|
+
- [Tests](#tests)
|
|
9
|
+
- [License](#license)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Defects and features
|
|
13
|
+
|
|
14
|
+
Open an issue on https://github.com/synesissoftware/xqsr3/issues.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Pull requests
|
|
18
|
+
|
|
19
|
+
Pull requests are welcome on https://github.com/synesissoftware/xqsr3. Keep diffs local to the change; match existing indentation (2 spaces in Ruby) and the Synesis markdown set (**README.md**, **CHANGES.md**, **NEWS.md**, **TODO.md**, **INSTALL.md**, **CONTRIBUTING.md**, **SECURITY.md**).
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Tests
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
bundle exec rake test
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
or `./run_all_unit_tests.sh`.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
Contributions are accepted under the 3-clause BSD license. See [LICENSE](./LICENSE).
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<!-- ########################### end of file ########################### -->
|
data/EXAMPLES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|Name|Source & Description|Summary|
|
|
4
4
|
|---|---|---|
|
|
5
|
-
|**count_word_frequencies**|[examples/count_word_frequencies.rb](
|
|
5
|
+
|**count_word_frequencies**|[examples/count_word_frequencies.rb](./examples/count_word_frequencies.rb)<br/>[examples/count_word_frequencies.md](./examples/count_word_frequencies.md)|Simple example supporting ```--help``` and ```--version```|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
<!-- ########################### end of file ########################### -->
|
data/FAQ.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# xqsr3 - FAQ <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
The FAQ list is under (constant) development. If you post a question on the
|
|
4
|
+
[Issues](https://github.com/synesissoftware/xqsr3/issues) forum
|
|
5
|
+
it will be used to create one.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Table of Contents <!-- omit in toc -->
|
|
9
|
+
|
|
10
|
+
- [Q1: "How do I install this library?"](#q1-how-do-i-install-this-library)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# FAQs: <!-- omit in toc -->
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Q1: "How do I install this library?"
|
|
17
|
+
|
|
18
|
+
Install via **gem**:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
gem install xqsr3
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See [README.md](./README.md) for usage.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<!-- ########################### end of file ########################### -->
|
data/INSTALL.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# xqsr3 - Installation and Use <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Install the gem](#install-the-gem)
|
|
7
|
+
- [From a source checkout](#from-a-source-checkout)
|
|
8
|
+
- [Using the library](#using-the-library)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install the gem
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
gem install xqsr3
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
or add to a **Gemfile**:
|
|
18
|
+
|
|
19
|
+
```Ruby
|
|
20
|
+
gem 'xqsr3'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
then `bundle install`.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## From a source checkout
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
bundle install
|
|
30
|
+
bundle exec rake test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Using the library
|
|
35
|
+
|
|
36
|
+
```Ruby
|
|
37
|
+
require 'xqsr3/containers/frequency_map'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<!-- ########################### end of file ########################### -->
|
data/NEWS.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| Date | News Item |
|
|
4
4
|
| ------------------- | ------------------------------------------------------------------------------------ |
|
|
5
|
+
| 21st August 2026 | [**xqsr3** 0.39.9](https://github.com/synesissoftware/xqsr3/releases/tag/0.39.9) |
|
|
5
6
|
| 20th August 2026 | [**xqsr3** 0.39.8](https://github.com/synesissoftware/xqsr3/releases/tag/0.39.8) |
|
|
6
7
|
| 19th August 2026 | [**xqsr3** 0.39.7](https://github.com/synesissoftware/xqsr3/releases/tag/0.39.7) |
|
|
7
8
|
| 18th August 2026 | [**xqsr3** 0.39.6](https://github.com/synesissoftware/xqsr3/releases/tag/0.39.6) |
|
data/README.md
CHANGED
|
@@ -138,8 +138,9 @@ Projects that depend on **xqsr3**:
|
|
|
138
138
|
|
|
139
139
|
##### Runtime dependents
|
|
140
140
|
|
|
141
|
-
* [**comment_strip
|
|
141
|
+
* [**comment_strip.r**](https://github.com/synesissoftware/comment_strip.r);
|
|
142
142
|
* [**libCLImate.Ruby**](https://github.com/synesissoftware/libCLImate.Ruby);
|
|
143
|
+
* [**oss-src-tools**](https://github.com/mwsis/oss-src-tools);
|
|
143
144
|
* [**xqsr3-xml**](https://github.com/synesissoftware/xqsr3-xml/);
|
|
144
145
|
|
|
145
146
|
|
|
@@ -149,9 +150,11 @@ Projects that depend on **xqsr3**:
|
|
|
149
150
|
* [**cmpfs.Ruby**](https://github.com/synesissoftware/cmpfs.Ruby);
|
|
150
151
|
* [**Diagnosticism.Ruby**](https://github.com/synesissoftware/Diagnosticism.Ruby);
|
|
151
152
|
* [**libpath.Ruby**](https://github.com/synesissoftware/libpath.Ruby);
|
|
153
|
+
* [**p99.Ruby**](https://github.com/synesissoftware/p99.Ruby);
|
|
152
154
|
* [**Pantheios.Ruby**](https://github.com/synesissoftware/Pantheios.Ruby);
|
|
153
|
-
* [**
|
|
155
|
+
* [**recls-helpers.Ruby**](https://github.com/synesissoftware/recls-helpers.Ruby);
|
|
154
156
|
* [**recls.Ruby**](https://github.com/synesissoftware/recls.Ruby);
|
|
157
|
+
* [**to_be.Ruby**](https://github.com/synesissoftware/to_be.Ruby);
|
|
155
158
|
|
|
156
159
|
|
|
157
160
|
### Related projects
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# xqsr3 - Security <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Table of Contents <!-- omit in toc -->
|
|
5
|
+
|
|
6
|
+
- [Reporting a vulnerability](#reporting-a-vulnerability)
|
|
7
|
+
- [Supported versions](#supported-versions)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Reporting a vulnerability
|
|
11
|
+
|
|
12
|
+
Please report security issues privately via GitHub Security Advisories on https://github.com/synesissoftware/xqsr3/security, or by opening an issue if an advisory cannot be filed. Do not attach exploit proofs of concept against third-party systems.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Supported versions
|
|
16
|
+
|
|
17
|
+
| Version | Supported |
|
|
18
|
+
| ------- | --------- |
|
|
19
|
+
| 0.39.x | ✅ |
|
|
20
|
+
| < 0.39 | ❌ |
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<!-- ########################### end of file ########################### -->
|
data/TODO.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
## Functional improvements
|
|
5
5
|
|
|
6
|
-
* [
|
|
7
|
-
* [
|
|
6
|
+
* [x] ~~~prepare `IO.writelines` (and related helpers) for frozen-string-literal defaults (Ruby 3.4+ warnings under `-W`)~~~;
|
|
7
|
+
* [x] ~~~quiet Ruby 3.4 `test-unit` warnings for blocks passed to `assert_nil` / `assert_not_nil` in **test/unit/quality/tc_parameter_checking.rb**~~~;
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
## Performance improvements
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
## Packaging improvements
|
|
16
16
|
|
|
17
|
-
* [
|
|
17
|
+
* [x] ~~~obtain a **run_all_unit_tests.sh** (from **misc-dev-scripts**) that skips `tput` when `$TERM` is unset or stdout is not a TTY (CI: `tput: No value for $TERM and no -T specified`)~~~;
|
|
18
|
+
* [x] ~~~after the packaging/boilerplate/CI baseline release: bump **VERSION**, drop gemspec `required_ruby_version` `< 4` upper bound, and align **CHANGES**~~~;
|
|
18
19
|
* [x] ~~~gemspec polish: `https` homepage, Rubygems `metadata` URIs, stop using `Date.today`, include **CHANGES.md** in packaged files~~~;
|
|
19
20
|
|
|
20
21
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::ArrayUtilities::JoinWithOr module
|
|
6
6
|
#
|
|
7
7
|
# Created: 7th December 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: FrequencyMap container
|
|
6
6
|
#
|
|
7
7
|
# Created: 28th January 2005
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: multimap container
|
|
6
6
|
#
|
|
7
7
|
# Created: 21st March 2007
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::Conversion::BoolParser module
|
|
6
6
|
#
|
|
7
7
|
# Created: 3rd June 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::Conversion::IntegerParser module
|
|
6
6
|
#
|
|
7
7
|
# Created: 21st November 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ExceptionUtilities module
|
|
6
6
|
#
|
|
7
7
|
# Created: 12th February 2015
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the WithCause inclusion module
|
|
6
6
|
#
|
|
7
7
|
# Created: 16th December 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: ::Xqsr3::Diagnostics::InspectBuilder module
|
|
6
6
|
#
|
|
7
7
|
# Created: 4th September 2018
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
data/lib/xqsr3/doc_.rb
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Documentation of the ::Xqsr3 modules
|
|
6
6
|
#
|
|
7
7
|
# Created: 10th June 2016
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a collect_with_index() method to the Enumerable module
|
|
6
6
|
#
|
|
7
7
|
# Created: 24th October 2010
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: ::Enumerable#detect_map extension
|
|
6
6
|
#
|
|
7
7
|
# Created: 3rd December 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a unique() method to the Enumerable module
|
|
6
6
|
#
|
|
7
7
|
# Created: 5th March 2007
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a to_s_grp() method to the Integer class
|
|
6
6
|
#
|
|
7
7
|
# Created: 29th March 2024
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a writelines() method to the IO class
|
|
6
6
|
#
|
|
7
7
|
# Created: 13th April 2007
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a Integer 'overload' to the Kernel module
|
|
6
6
|
#
|
|
7
7
|
# Created: 21st November 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a raise_with_options() method to the Kernel module
|
|
6
6
|
#
|
|
7
7
|
# Created: 12th February 2015
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::HashUtilities::DeepTransform module
|
|
6
6
|
#
|
|
7
7
|
# Created: 3rd June 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::HashUtilities::KeyMatching module
|
|
6
6
|
#
|
|
7
7
|
# Created: 15th November 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
# Test::Unit module
|
|
7
7
|
#
|
|
8
8
|
# Created: 29th August 2025
|
|
9
|
-
# Updated:
|
|
9
|
+
# Updated: 19th August 2026
|
|
10
10
|
#
|
|
11
|
-
# Home:
|
|
11
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
12
12
|
#
|
|
13
13
|
# Author: Matthew Wilson
|
|
14
14
|
#
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
# Test::Unit module
|
|
7
7
|
#
|
|
8
8
|
# Created: March 2nd 2019
|
|
9
|
-
# Updated:
|
|
9
|
+
# Updated: 19th August 2026
|
|
10
10
|
#
|
|
11
|
-
# Home:
|
|
11
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
12
12
|
#
|
|
13
13
|
# Author: Matthew Wilson
|
|
14
14
|
#
|
data/lib/xqsr3/io/writelines.rb
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Adds a writelines() method to the IO module
|
|
6
6
|
#
|
|
7
7
|
# Created: 13th April 2007
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -80,7 +80,10 @@ module IO
|
|
|
80
80
|
|
|
81
81
|
target << line_separator unless first
|
|
82
82
|
|
|
83
|
-
target << "#{k}#{column_separator}#{v}"
|
|
83
|
+
# target << "#{k}#{column_separator}#{v}"
|
|
84
|
+
target << k.to_s
|
|
85
|
+
target << column_separator
|
|
86
|
+
target << v.to_s
|
|
84
87
|
|
|
85
88
|
first = false
|
|
86
89
|
end
|
|
@@ -90,7 +93,7 @@ module IO
|
|
|
90
93
|
|
|
91
94
|
target << line_separator unless first
|
|
92
95
|
|
|
93
|
-
target <<
|
|
96
|
+
target << element.to_s
|
|
94
97
|
|
|
95
98
|
first = false
|
|
96
99
|
end
|
|
@@ -101,13 +104,19 @@ module IO
|
|
|
101
104
|
|
|
102
105
|
contents.each do |k, v|
|
|
103
106
|
|
|
104
|
-
target << "#{k}#{column_separator}#{v}#{line_separator}"
|
|
107
|
+
# target << "#{k}#{column_separator}#{v}#{line_separator}"
|
|
108
|
+
target << k.to_s
|
|
109
|
+
target << column_separator
|
|
110
|
+
target << v.to_s
|
|
111
|
+
target << line_separator
|
|
105
112
|
end
|
|
106
113
|
else
|
|
107
114
|
|
|
108
115
|
contents.each do |element|
|
|
109
116
|
|
|
110
|
-
target << "#{element}#{line_separator}"
|
|
117
|
+
# target << "#{element}#{line_separator}"
|
|
118
|
+
target << element.to_s
|
|
119
|
+
target << line_separator
|
|
111
120
|
end
|
|
112
121
|
end
|
|
113
122
|
end
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ParameterChecking module
|
|
6
6
|
#
|
|
7
7
|
# Created: 12th February 2015
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::EndsWith module
|
|
6
6
|
#
|
|
7
7
|
# Created: 13th April 2016
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::NilIfEmpty module
|
|
6
6
|
#
|
|
7
7
|
# Created: 25th January 2018
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::QuoteIf module
|
|
6
6
|
#
|
|
7
7
|
# Created: 3rd June 2017
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::StartsWith module
|
|
6
6
|
#
|
|
7
7
|
# Created: 13th April 2016
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::ToSymbol module
|
|
6
6
|
#
|
|
7
7
|
# Created: 14th April 2016
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Definition of the ::Xqsr3::StringUtilities::Truncate module
|
|
6
6
|
#
|
|
7
7
|
# Created: 12th April 2018
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 19th August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
data/lib/xqsr3/version.rb
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
# Purpose: Version for Xqsr3 library
|
|
6
6
|
#
|
|
7
7
|
# Created: 3rd April 2016
|
|
8
|
-
# Updated:
|
|
8
|
+
# Updated: 21st August 2026
|
|
9
9
|
#
|
|
10
|
-
# Home:
|
|
10
|
+
# Home: https://github.com/synesissoftware/xqsr3
|
|
11
11
|
#
|
|
12
12
|
# Author: Matthew Wilson
|
|
13
13
|
#
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
module Xqsr3
|
|
52
52
|
|
|
53
53
|
# Current version of the Xqsr3 library
|
|
54
|
-
VERSION = '0.39.
|
|
54
|
+
VERSION = '0.39.9'
|
|
55
55
|
|
|
56
56
|
private
|
|
57
57
|
VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
|
|
@@ -6,17 +6,26 @@ $:.unshift File.join(File.dirname(__FILE__), '../../../../lib')
|
|
|
6
6
|
require 'xqsr3/extensions/io/writelines'
|
|
7
7
|
|
|
8
8
|
require 'test/unit'
|
|
9
|
-
|
|
10
9
|
require 'stringio'
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class Test_IO_writelines < Test::Unit::TestCase
|
|
14
13
|
|
|
14
|
+
# HACK: StringIO needs a mutable backing buffer. `StringIO.new('', 'a')`
|
|
15
|
+
# fails when the empty literal is frozen (Ruby 3.4+ frozen-string-literal
|
|
16
|
+
# defaults). `StringIO.new(+'', 'a')` uses `String#+@`, which does not
|
|
17
|
+
# exist before Ruby 2.3 (CI: 2.0 `undefined method '+@'`). `String.new`
|
|
18
|
+
# allocates an unfrozen empty string on MRI 1.9.3 through 4.x.
|
|
19
|
+
def writable_stringio(mode = 'a')
|
|
20
|
+
|
|
21
|
+
StringIO.new(String.new, mode)
|
|
22
|
+
end
|
|
23
|
+
|
|
15
24
|
def test_single_string
|
|
16
25
|
|
|
17
26
|
input = 'abc'
|
|
18
27
|
|
|
19
|
-
s =
|
|
28
|
+
s = writable_stringio
|
|
20
29
|
|
|
21
30
|
r = ::IO.writelines s, input
|
|
22
31
|
|
|
@@ -28,7 +37,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
28
37
|
|
|
29
38
|
input = 'abc'
|
|
30
39
|
|
|
31
|
-
s =
|
|
40
|
+
s = writable_stringio
|
|
32
41
|
|
|
33
42
|
r = ::IO.writelines s, input, no_last_eol: true
|
|
34
43
|
|
|
@@ -40,7 +49,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
40
49
|
|
|
41
50
|
input = [ 'abc' ]
|
|
42
51
|
|
|
43
|
-
s =
|
|
52
|
+
s = writable_stringio
|
|
44
53
|
|
|
45
54
|
r = ::IO.writelines s, input
|
|
46
55
|
|
|
@@ -52,7 +61,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
52
61
|
|
|
53
62
|
input = { 'abc' => '' }
|
|
54
63
|
|
|
55
|
-
s =
|
|
64
|
+
s = writable_stringio
|
|
56
65
|
|
|
57
66
|
r = ::IO.writelines s, input
|
|
58
67
|
|
|
@@ -64,7 +73,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
64
73
|
|
|
65
74
|
input = { 'abc' => '' }
|
|
66
75
|
|
|
67
|
-
s =
|
|
76
|
+
s = writable_stringio
|
|
68
77
|
|
|
69
78
|
r = ::IO.writelines s, input, no_last_eol: true
|
|
70
79
|
|
|
@@ -76,7 +85,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
76
85
|
|
|
77
86
|
input = [ 'abc', 'def' ]
|
|
78
87
|
|
|
79
|
-
s =
|
|
88
|
+
s = writable_stringio
|
|
80
89
|
|
|
81
90
|
r = ::IO.writelines s, input
|
|
82
91
|
|
|
@@ -88,7 +97,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
88
97
|
|
|
89
98
|
input = [ 'abc', 'def' ]
|
|
90
99
|
|
|
91
|
-
s =
|
|
100
|
+
s = writable_stringio
|
|
92
101
|
|
|
93
102
|
r = ::IO.writelines s, input, ''
|
|
94
103
|
|
|
@@ -100,7 +109,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
100
109
|
|
|
101
110
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
102
111
|
|
|
103
|
-
s =
|
|
112
|
+
s = writable_stringio
|
|
104
113
|
|
|
105
114
|
r = ::IO.writelines s, input
|
|
106
115
|
|
|
@@ -112,7 +121,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
112
121
|
|
|
113
122
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
114
123
|
|
|
115
|
-
s =
|
|
124
|
+
s = writable_stringio
|
|
116
125
|
|
|
117
126
|
r = ::IO.writelines s, input, no_last_eol: true
|
|
118
127
|
|
|
@@ -124,7 +133,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
124
133
|
|
|
125
134
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
126
135
|
|
|
127
|
-
s =
|
|
136
|
+
s = writable_stringio
|
|
128
137
|
|
|
129
138
|
r = ::IO.writelines s, input, column_separator: "\t"
|
|
130
139
|
|
|
@@ -136,7 +145,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
136
145
|
|
|
137
146
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
138
147
|
|
|
139
|
-
s =
|
|
148
|
+
s = writable_stringio
|
|
140
149
|
|
|
141
150
|
r = ::IO.writelines s, input, line_separator: '+'
|
|
142
151
|
|
|
@@ -148,7 +157,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
148
157
|
|
|
149
158
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
150
159
|
|
|
151
|
-
s =
|
|
160
|
+
s = writable_stringio
|
|
152
161
|
|
|
153
162
|
r = ::IO.writelines s, input, line_separator: '+', column_separator: "\t"
|
|
154
163
|
|
|
@@ -160,7 +169,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
160
169
|
|
|
161
170
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
162
171
|
|
|
163
|
-
s =
|
|
172
|
+
s = writable_stringio
|
|
164
173
|
|
|
165
174
|
r = ::IO.writelines s, input, line_separator: '+', column_separator: "\t", no_last_eol: true
|
|
166
175
|
|
|
@@ -172,7 +181,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
172
181
|
|
|
173
182
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
174
183
|
|
|
175
|
-
s =
|
|
184
|
+
s = writable_stringio
|
|
176
185
|
|
|
177
186
|
r = ::IO.writelines s, input, '+'
|
|
178
187
|
|
|
@@ -184,7 +193,7 @@ class Test_IO_writelines < Test::Unit::TestCase
|
|
|
184
193
|
|
|
185
194
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
186
195
|
|
|
187
|
-
s =
|
|
196
|
+
s = writable_stringio
|
|
188
197
|
|
|
189
198
|
r = ::IO.writelines s, input, '+', '-'
|
|
190
199
|
|
|
@@ -14,11 +14,21 @@ include ::Xqsr3::IO
|
|
|
14
14
|
|
|
15
15
|
class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
16
16
|
|
|
17
|
+
# HACK: StringIO needs a mutable backing buffer. `StringIO.new('', 'a')`
|
|
18
|
+
# fails when the empty literal is frozen (Ruby 3.4+ frozen-string-literal
|
|
19
|
+
# defaults). `StringIO.new(+'', 'a')` uses `String#+@`, which does not
|
|
20
|
+
# exist before Ruby 2.3 (CI: 2.0 `undefined method '+@'`). `String.new`
|
|
21
|
+
# allocates an unfrozen empty string on MRI 1.9.3 through 4.x.
|
|
22
|
+
def writable_stringio(mode = 'a')
|
|
23
|
+
|
|
24
|
+
StringIO.new(String.new, mode)
|
|
25
|
+
end
|
|
26
|
+
|
|
17
27
|
def test_single_string
|
|
18
28
|
|
|
19
29
|
input = 'abc'
|
|
20
30
|
|
|
21
|
-
s =
|
|
31
|
+
s = writable_stringio
|
|
22
32
|
|
|
23
33
|
r = ::Xqsr3::IO.writelines s, input
|
|
24
34
|
|
|
@@ -30,7 +40,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
30
40
|
|
|
31
41
|
input = [ 'abc' ]
|
|
32
42
|
|
|
33
|
-
s =
|
|
43
|
+
s = writable_stringio
|
|
34
44
|
|
|
35
45
|
r = ::Xqsr3::IO.writelines s, input
|
|
36
46
|
|
|
@@ -42,7 +52,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
42
52
|
|
|
43
53
|
input = { 'abc' => '' }
|
|
44
54
|
|
|
45
|
-
s =
|
|
55
|
+
s = writable_stringio
|
|
46
56
|
|
|
47
57
|
r = ::Xqsr3::IO.writelines s, input
|
|
48
58
|
|
|
@@ -54,7 +64,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
54
64
|
|
|
55
65
|
input = [ 'abc', 'def' ]
|
|
56
66
|
|
|
57
|
-
s =
|
|
67
|
+
s = writable_stringio
|
|
58
68
|
|
|
59
69
|
r = ::Xqsr3::IO.writelines s, input
|
|
60
70
|
|
|
@@ -66,7 +76,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
66
76
|
|
|
67
77
|
input = [ 'abc', 'def' ]
|
|
68
78
|
|
|
69
|
-
s =
|
|
79
|
+
s = writable_stringio
|
|
70
80
|
|
|
71
81
|
r = ::Xqsr3::IO.writelines s, input, line_separator: ''
|
|
72
82
|
|
|
@@ -78,7 +88,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
78
88
|
|
|
79
89
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
80
90
|
|
|
81
|
-
s =
|
|
91
|
+
s = writable_stringio
|
|
82
92
|
|
|
83
93
|
r = ::Xqsr3::IO.writelines s, input
|
|
84
94
|
|
|
@@ -90,7 +100,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
90
100
|
|
|
91
101
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
92
102
|
|
|
93
|
-
s =
|
|
103
|
+
s = writable_stringio
|
|
94
104
|
|
|
95
105
|
r = ::Xqsr3::IO.writelines s, input, no_last_eol: true
|
|
96
106
|
|
|
@@ -102,7 +112,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
102
112
|
|
|
103
113
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
104
114
|
|
|
105
|
-
s =
|
|
115
|
+
s = writable_stringio
|
|
106
116
|
|
|
107
117
|
r = ::Xqsr3::IO.writelines s, input, column_separator: "\t"
|
|
108
118
|
|
|
@@ -114,7 +124,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
114
124
|
|
|
115
125
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
116
126
|
|
|
117
|
-
s =
|
|
127
|
+
s = writable_stringio
|
|
118
128
|
|
|
119
129
|
r = ::Xqsr3::IO.writelines s, input, line_separator: '+'
|
|
120
130
|
|
|
@@ -126,7 +136,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
126
136
|
|
|
127
137
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
128
138
|
|
|
129
|
-
s =
|
|
139
|
+
s = writable_stringio
|
|
130
140
|
|
|
131
141
|
r = ::Xqsr3::IO.writelines s, input, line_separator: '+', column_separator: "\t"
|
|
132
142
|
|
|
@@ -138,7 +148,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
138
148
|
|
|
139
149
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
140
150
|
|
|
141
|
-
s =
|
|
151
|
+
s = writable_stringio
|
|
142
152
|
|
|
143
153
|
r = ::Xqsr3::IO.writelines s, input, line_separator: '+', column_separator: "\t", no_last_eol: true
|
|
144
154
|
|
|
@@ -150,7 +160,7 @@ class Test_Xqsr3_IO_writelines < Test::Unit::TestCase
|
|
|
150
160
|
|
|
151
161
|
input = { 'ab' => 'c', 'de' => 'f' }
|
|
152
162
|
|
|
153
|
-
s =
|
|
163
|
+
s = writable_stringio
|
|
154
164
|
|
|
155
165
|
r = ::Xqsr3::IO.writelines s, input, line_separator: '+', column_separator: '-'
|
|
156
166
|
|
|
@@ -122,9 +122,9 @@ class Test_parameter_checks_as_included_module < Test::Unit::TestCase
|
|
|
122
122
|
|
|
123
123
|
# test 2
|
|
124
124
|
|
|
125
|
-
def check_method_2 a, types, options = {}
|
|
125
|
+
def check_method_2 a, types, options = {}, &block
|
|
126
126
|
|
|
127
|
-
check_param a, 'a', options.merge({ types: types })
|
|
127
|
+
check_param a, 'a', options.merge({ types: types }), &block
|
|
128
128
|
end
|
|
129
129
|
|
|
130
130
|
def test_2
|
|
@@ -143,7 +143,7 @@ class Test_parameter_checks_as_included_module < Test::Unit::TestCase
|
|
|
143
143
|
assert_not_nil check_method_2(//, [ [ ::String ], ::Regexp ], nothrow: true)
|
|
144
144
|
assert_not_nil check_method_2([ [ 'abc', 'def' ], [ 'ghi', 'jkl' ] ], [ [ ::String ], ::Regexp, [ ::Array ] ], nothrow: true)
|
|
145
145
|
|
|
146
|
-
assert_not_nil
|
|
146
|
+
assert_not_nil(check_method_2([ [ 'abc', 'def' ], [ 'ghi', 'jkl' ] ], [ [ ::String ], ::Regexp, [ ::Array ] ], nothrow: true) do |v|
|
|
147
147
|
|
|
148
148
|
if ::Array === v
|
|
149
149
|
|
|
@@ -154,9 +154,9 @@ class Test_parameter_checks_as_included_module < Test::Unit::TestCase
|
|
|
154
154
|
|
|
155
155
|
true
|
|
156
156
|
end
|
|
157
|
-
end
|
|
157
|
+
end)
|
|
158
158
|
|
|
159
|
-
assert_nil
|
|
159
|
+
assert_nil(check_method_2([ [ 'abc', 'def' ], nil, [ 'ghi', 'jkl' ] ], [ [ ::String ], ::Regexp, [ ::Array ] ], nothrow: true) do |v|
|
|
160
160
|
|
|
161
161
|
if ::Array === v
|
|
162
162
|
|
|
@@ -167,7 +167,7 @@ class Test_parameter_checks_as_included_module < Test::Unit::TestCase
|
|
|
167
167
|
|
|
168
168
|
true
|
|
169
169
|
end
|
|
170
|
-
end
|
|
170
|
+
end)
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xqsr3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.39.
|
|
4
|
+
version: 0.39.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Wilson
|
|
@@ -22,11 +22,15 @@ extra_rdoc_files: []
|
|
|
22
22
|
files:
|
|
23
23
|
- AUTHORS.md
|
|
24
24
|
- CHANGES.md
|
|
25
|
+
- CONTRIBUTING.md
|
|
25
26
|
- EXAMPLES.md
|
|
27
|
+
- FAQ.md
|
|
28
|
+
- INSTALL.md
|
|
26
29
|
- LICENSE
|
|
27
30
|
- NEWS.md
|
|
28
31
|
- README.md
|
|
29
32
|
- Rakefile
|
|
33
|
+
- SECURITY.md
|
|
30
34
|
- TODO.md
|
|
31
35
|
- examples/count_word_frequencies.md
|
|
32
36
|
- examples/count_word_frequencies.rb
|
|
@@ -191,5 +195,5 @@ requirements: []
|
|
|
191
195
|
rubygems_version: 3.0.3.1
|
|
192
196
|
signing_key:
|
|
193
197
|
specification_version: 4
|
|
194
|
-
summary:
|
|
198
|
+
summary: eXtensions by fine Quantum for Standard Ruby and 3rd-party libraries
|
|
195
199
|
test_files: []
|