rcx 0.4.0 → 0.4.1

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: 422a1c5bd974518c00e3a6c0ca86ac38f6c62ff06dd56acf0971973f215208bc
4
- data.tar.gz: 8ecbbb1e288c7df1ebdb317f64c1c2656faf50044c4e6d06c598a6789d21906d
3
+ metadata.gz: ce9f666d5afd1ffe424c7b8e5626537798e7a9dc4f19ab783f9989666ae4e31a
4
+ data.tar.gz: 87e2026fc88693d433d21dddbd337808f1b4ec15f3ffedfb80cb48fa257a7ead
5
5
  SHA512:
6
- metadata.gz: ec21a72b07c85b513459908b61733ee68c61c3116729ed87209a603666ed2396edb0ab140449db0d16185a183215dfb750c5e9ae8f5af5c3652accd63196dad6
7
- data.tar.gz: 4d3bbb65011e6e2649da175130f22cd9bcf4bbbd95830452e06bad119d02b3904e2e514bc4aac05f92e32729bc463faa865ea6d6c4bccbd061a00b39cedb8d7a
6
+ metadata.gz: d11fcf253149217c95c8f2be3e493607cba542ba9c991f0d55a067198b2e6d5ade3beea98c46a740363b87d91a4f4430b74d58b10c159ba5725ea61d33660bf9
7
+ data.tar.gz: 514a44dab049c8a7d854777f1ce8b8bec7cbc7a08acc322cda5b7d39d43d7f97053e3d7ee52476c8494914cd7ba5e9d8a9317ae9c578843b592ed2cae92d785d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## UNRELEASED
2
2
 
3
+ ## v0.4.1 (2025-09-06)
4
+ - Improved the types of the builtin classes to properly relate to the value wrappers.
5
+
3
6
  ## v0.4.0 (2025-09-03)
4
7
  - Renamed `rcx::arg` namespace to `rcx::args` to prevent conflit with `rcx::arg::arg`.
5
8
 
@@ -71,14 +71,6 @@ namespace rcx {
71
71
  template <typename T>
72
72
  concept Void = std::is_void_v<T>;
73
73
 
74
- template <typename T>
75
- concept StringLike = requires {
76
- typename std::remove_cvref_t<T>::value_type;
77
- typename std::remove_cvref_t<T>::traits_type;
78
- typename std::basic_string_view<typename std::remove_cvref_t<T>::value_type,
79
- typename std::remove_cvref_t<T>::traits_type>;
80
- };
81
-
82
74
  /// Specifies the types that can be used as Ruby identifiers.
83
75
  ///
84
76
  /// This includes \ref rcx::Id, \ref rcx::value::Symbol and C++ strings.
@@ -410,6 +402,16 @@ namespace rcx {
410
402
  requires CharTraits<::rcx::CharTraits<std::remove_cvref_t<T>>>;
411
403
  typename std::basic_string_view<std::remove_cvref_t<T>>;
412
404
  };
405
+
406
+ /// Specifies the string types that can be mapped to Ruby strings.
407
+ ///
408
+ template <typename T>
409
+ concept StringLike = requires {
410
+ requires CharLike<typename std::remove_cvref_t<T>::value_type>;
411
+ typename std::remove_cvref_t<T>::traits_type;
412
+ typename std::basic_string_view<typename std::remove_cvref_t<T>::value_type,
413
+ typename std::remove_cvref_t<T>::traits_type>;
414
+ };
413
415
  };
414
416
 
415
417
  /// Literals
@@ -1152,7 +1154,8 @@ namespace rcx {
1152
1154
  inline value::Class const Encoding = detail::unsafe_coerce<value::Class>(::rb_cEncoding);
1153
1155
  /// `Symbol` class
1154
1156
  ///
1155
- inline value::Class const Symbol = detail::unsafe_coerce<value::Class>(::rb_cSymbol);
1157
+ inline value::ClassT<value::Symbol> const Symbol =
1158
+ detail::unsafe_coerce<value::ClassT<value::Symbol>>(::rb_cSymbol);
1156
1159
  /// `Regexp` class
1157
1160
  ///
1158
1161
  inline value::Class const Regexp = detail::unsafe_coerce<value::Class>(::rb_cRegexp);
@@ -1192,10 +1195,12 @@ namespace rcx {
1192
1195
  inline value::Class const Range = detail::unsafe_coerce<value::Class>(::rb_cRange);
1193
1196
  /// `IO` class
1194
1197
  ///
1195
- inline value::Class const IO = detail::unsafe_coerce<value::Class>(::rb_cIO);
1198
+ inline value::ClassT<value::IO> const IO =
1199
+ detail::unsafe_coerce<value::ClassT<value::IO>>(::rb_cIO);
1196
1200
  /// `File` class
1197
1201
  ///
1198
- inline value::Class const File = detail::unsafe_coerce<value::Class>(::rb_cFile);
1202
+ inline value::ClassT<value::IO> const File =
1203
+ detail::unsafe_coerce<value::ClassT<value::IO>>(::rb_cFile);
1199
1204
  /// `Thread` class
1200
1205
  ///
1201
1206
  inline value::Class const Thread = detail::unsafe_coerce<value::Class>(::rb_cThread);
@@ -1344,7 +1349,8 @@ namespace rcx {
1344
1349
  #ifdef RCX_IO_BUFFER
1345
1350
  /// `IO::Buffer` class
1346
1351
  ///
1347
- inline value::Class const IOBuffer = detail::unsafe_coerce<value::Class>(::rb_cIOBuffer);
1352
+ inline value::ClassT<value::IOBuffer> const IOBuffer =
1353
+ detail::unsafe_coerce<value::ClassT<value::IOBuffer>>(::rb_cIOBuffer);
1348
1354
  #endif
1349
1355
  };
1350
1356
 
data/lib/rcx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RCX
2
- VERSION = -'0.4.0'
2
+ VERSION = -'0.4.1'
3
3
  end
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.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasumi Hanazuki