rcx 0.4.1 → 0.4.2
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/.bump-version +7 -0
- data/CHANGELOG.md +7 -0
- data/include/rcx/internal/rcx.hpp +1 -1
- data/include/rcx/internal/rcx_impl.hpp +3 -3
- data/lib/rcx/mkmf.rb +5 -1
- data/lib/rcx/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7822f2ed40c3e4b7da3e837b2b37ee28e735734c6377be9566709866e354dadd
|
|
4
|
+
data.tar.gz: 8584ca04f6f6b24fcf242a13f42bc0454a1473eaa6e42283c80ac7e1061e88d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 696a943b8141afc36e7230c5254948d70633254008b50fc24a6f2f1193b4efed07d83a3888984755ed3f4c8081674d54be42ce3de8a3ca7fa8bad0ffc0fdb5c0
|
|
7
|
+
data.tar.gz: c68825407f75d96e67a0d25a67eed442f784002f9f7564340b2ea35b79354b526d101a6e8c448d150e4e212b9b126b6e85c92d6c456b772ed180382498051743
|
data/.bump-version
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
[bumpVersion]
|
|
2
|
+
scheme = zero
|
|
3
|
+
tagPrefix = v
|
|
4
|
+
path = lib/rcx/version.rb
|
|
5
|
+
pattern = "VERSION = -'(?<version>.+?)'"
|
|
6
|
+
postCommand = bundle lock
|
|
7
|
+
postCommand = "ruby -e 'today = Time.now.strftime(%[%Y-%m-%d]); ARGV.each {|path| File.write(path, File.read(path).sub(/## Unreleased\\n\\K/i, %|\\n## v#{ENV.fetch(%[NEW_VERSION])} (#{today})\\n|)) }' CHANGELOG.md"
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
## UNRELEASED
|
|
2
2
|
|
|
3
|
+
## v0.4.2 (2026-09-18)
|
|
4
|
+
|
|
5
|
+
## v0.4.2.alpha1 (2026-09-18)
|
|
6
|
+
- Fix UB in `rcx::protect`.
|
|
7
|
+
- Fix conversion of std::optional from/into Ruby Value.
|
|
8
|
+
- Support IO::Buffer version 3 (expected to be shipped with Ruby 4.1)
|
|
9
|
+
|
|
3
10
|
## v0.4.1 (2025-09-06)
|
|
4
11
|
- Improved the types of the builtin classes to properly relate to the value wrappers.
|
|
5
12
|
|
|
@@ -170,7 +170,7 @@ namespace rcx {
|
|
|
170
170
|
return;
|
|
171
171
|
} else {
|
|
172
172
|
std::optional<Result> result;
|
|
173
|
-
auto callback = [&functor, &result]() {
|
|
173
|
+
auto callback = [&functor, &result]() { result = functor(); };
|
|
174
174
|
using Callback = decltype(callback);
|
|
175
175
|
|
|
176
176
|
::rb_protect(
|
|
@@ -1245,12 +1245,12 @@ namespace rcx {
|
|
|
1245
1245
|
|
|
1246
1246
|
template <concepts::ConvertibleFromValue T>
|
|
1247
1247
|
decltype(auto) FromValue<std::optional<T>>::convert(Value v) {
|
|
1248
|
-
return v.is_nil() ? std::
|
|
1248
|
+
return v.is_nil() ? std::optional<T>{} : from_Value<T>(v);
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
1251
|
template <concepts::ConvertibleIntoValue T>
|
|
1252
1252
|
Value IntoValue<std::optional<T>>::convert(std::optional<T> value) {
|
|
1253
|
-
return value ?
|
|
1253
|
+
return value ? into_Value(*value) : Value::qnil;
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
1256
|
template <concepts::ConvertibleFromValue... T>
|
data/lib/rcx/mkmf.rb
CHANGED
|
@@ -9,6 +9,8 @@ module RCX
|
|
|
9
9
|
'c++23' => %w[--std=c++23 --std=c++2b].freeze,
|
|
10
10
|
'c++26' => %w[--std=c++26 --std=c++2c].freeze,
|
|
11
11
|
}.freeze
|
|
12
|
+
# Ruby < 3.4.2 includes <cstdbool>, which warns with newer libstdc++.
|
|
13
|
+
CXX_FLAG_PROBE_WERROR = (RUBY_VERSION.split('.').map(&:to_i) <=> [3, 4, 2]) >= 0
|
|
12
14
|
|
|
13
15
|
root = File.join(__dir__, '../..')
|
|
14
16
|
INCDIR = File.join(root, 'include').shellescape
|
|
@@ -19,7 +21,9 @@ module RCX
|
|
|
19
21
|
|
|
20
22
|
def setup_rcx(cxx_standard: 'c++20')
|
|
21
23
|
CXX_STANDARD_FLAGS.fetch(cxx_standard).find do |flag|
|
|
22
|
-
if checking_for("whether #{flag} is accepted as CXXFLAGS") {
|
|
24
|
+
if checking_for("whether #{flag} is accepted as CXXFLAGS") {
|
|
25
|
+
try_cflags(flag, werror: CXX_FLAG_PROBE_WERROR)
|
|
26
|
+
}
|
|
23
27
|
$CXXFLAGS << " " << flag
|
|
24
28
|
true
|
|
25
29
|
else
|
data/lib/rcx/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rcx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kasumi Hanazuki
|
|
@@ -30,6 +30,7 @@ executables: []
|
|
|
30
30
|
extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
|
32
32
|
files:
|
|
33
|
+
- ".bump-version"
|
|
33
34
|
- ".clang-format"
|
|
34
35
|
- ".rspec"
|
|
35
36
|
- ".yarnrc.yml"
|
|
@@ -69,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
69
70
|
- !ruby/object:Gem::Version
|
|
70
71
|
version: '0'
|
|
71
72
|
requirements: []
|
|
72
|
-
rubygems_version:
|
|
73
|
+
rubygems_version: 4.0.20
|
|
73
74
|
specification_version: 4
|
|
74
75
|
summary: Write Ruby extension in modern C++
|
|
75
76
|
test_files: []
|