beni 0.18.0 → 0.19.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/README.md +1 -1
  4. data/lib/beni/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ca75b706bbc63ea694213d7c76f92dd47647d8c4a0dfecd4492e190a9a27357
4
- data.tar.gz: 27608bd68e034a970a019e700db0068bb87b605ddb64cb4c2041d183aac00ccd
3
+ metadata.gz: 36da2e645c0d9ca2ff90d97616c6d61b3c980f2c9d7fe86787fd9f4a7b37b6d8
4
+ data.tar.gz: 6427252a51072ac6b4765a9bdb48dddd0e0f54871851868ab6e59aa893ebeabe
5
5
  SHA512:
6
- metadata.gz: 68cad9299f8edb171c67b9b69ec3bbb3ca14fc1cc5a1551d6f5e658494520028fd150b9c0a4b0b709df6b68e5c7335919fb90386b020a1c6de38a0b8936cc22d
7
- data.tar.gz: d7b8d216a9841212606205820403936d5272371b0a506dcb5c4ea1c9f51fa34c3f6ffe84a6099b47d31cc169f167e771a9761c3c59c78b01d69896c294efb262
6
+ metadata.gz: 01c6056118dc5d79f384744f454d33a2d0deae44ace23ea1bc1ca43112c2bbe58f03520f75275a9c889f18131157b673b68aa18e962bd4c7784c75201ae0c8e7
7
+ data.tar.gz: 64e19fb993583a5474aea35a77582d03fe332bb0d149fda75f0549712c44f3e951c29c49aa2c493b1f442ce15254754c83d28d480018ac5e83934600516e003f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.19.0](https://github.com/elct9620/beni/compare/v0.18.0...v0.19.0) (2026-10-03)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **beni:** `Module::define_const` is removed; call `const_set`. `Mrb::define_global_const` runs `Object`'s `const_added` hook and takes `(name: impl IntoId, val: impl IntoValue)`.
9
+ * **beni:** `beni::class::Module` and `beni::class::Object` move to
10
+ * **beni:** `Value::nil()`, `Value::true_()`, and `Value::false_()` are removed; call `beni::value::qnil()` (and `qtrue` / `qfalse`), passing the handle where an `IntoValue` or `ReprValue` is taken and `.as_value()` where a `Value` is.
11
+ * **beni:** bring the traits into scope with `use beni::prelude::*`. `ivar_*` and `singleton_class` need an instance-variable holder handle (`RObject::from_value(v)` and the like) and `const_*` / `cvar_*` a class or module handle. `ivar_get`, `const_get`, and `cvar_get` take a target type (`ivar_get::<_, Value>`), and `ivar_get` surfaces a key that cannot be interned as an `Err` rather than reading `nil`.
12
+ * **beni:** `beni::cstr!` and `beni::cstr_ptr` are removed; write a `c"..."` literal and call `.as_ptr()` on it.
13
+ * **beni:** renamed — `Value::obj_as_string` to `to_r_string`; `iv_get` / `iv_set` / `iv_defined` / `iv_remove` / `each_iv` to `ivar_get` / `ivar_set` / `ivar_defined` / `ivar_remove` / `ivar_foreach`; `cv_get` / `cv_set` / `cv_defined` to `cvar_get` / `cvar_set` / `cvar_defined`; `obj_dup` to `dup`; `obj_equal` to `is_equal`; `RClass::obj_new` to `new_instance`; `Value::to_ary` to the associated `RArray::to_ary(value, mrb)`; `ExceptionClass::exc_new_str` to `new_str`, now answering an `Exception`. Removed from the public surface — `ExceptionClass::exc_new`, built through `Error::new` instead, and `Value::obj_clone`, dispatched as `clone` through `Value::funcall`.
14
+ * **beni:** `Value::ary_entry` is removed — downcast with
15
+ * **beni:** `Value::unbox_integer` and `Value::unbox_float` are no longer public — read through `Integer::from_value(v)?.to_i64(mrb)` or
16
+ * **beni:** `Value::ensure_string`, `ensure_array`, `ensure_hash`, `ensure_int`, and `ensure_float` are removed — convert through `RString::try_convert(v, mrb)` and its siblings, `Integer::try_convert`, or `Float::try_convert`. `Value::int_to_str` is now
17
+ * **beni:** `Value::is_true`, `is_false`, `is_integer`, `is_float`, `is_array`, `is_hash`, `is_class`, `is_sclass`, `is_module`, `is_proc`, `is_data`, `is_istruct`, `is_cptr`, `is_string`, `is_symbol`, `is_range` and `is_exception` are removed. Convert into the matching handle instead — `Qtrue::from_value(v)`, `Integer::from_value(v)`, `RArray::from_value(v)`, … — and read a singleton class through `RClass::is_singleton`.
18
+ * **beni:** `beni::Array` is now `beni::RArray` and `beni::Hash` is now `beni::RHash`; their methods and conversions are unchanged.
19
+
20
+ ### Features
21
+
22
+ * **beni-macros:** derive InlineStruct and wrap a struct inline ([72c8abb](https://github.com/elct9620/beni/commit/72c8abb143ff577d46eede6864d0a20912b9e8b4))
23
+ * **beni-sys:** bind mruby's inline-struct header ([293271c](https://github.com/elct9620/beni/commit/293271cf4d91c31c802c686dc1e5a706065f54df))
24
+ * **beni:** convert a value into a handle for every tag it can carry ([ddccea7](https://github.com/elct9620/beni/commit/ddccea7af2729b6d6fce6281a253081756f0c164))
25
+ * **beni:** read an Integer or Float handle out as a Rust number ([8514850](https://github.com/elct9620/beni/commit/8514850fe646660a38e2e500cdf79a4e725e33d8))
26
+ * **beni:** store plain Rust data inside mruby objects as inline structs ([2cbfb91](https://github.com/elct9620/beni/commit/2cbfb91e2229861f719035b8c8a57a24b88cc8a5))
27
+ * **beni:** take a method argument as any tagged handle ([29d87f8](https://github.com/elct9620/beni/commit/29d87f89afaff29b219d7c0715101fe45947e7d2))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **beni:** answer the C-pointer and inline-struct tags with predicates ([db5362c](https://github.com/elct9620/beni/commit/db5362cfedb1dd7ffd7576fa7d79311e86154150))
33
+
34
+
35
+ ### Code Refactoring
36
+
37
+ * **beni:** answer nil, true, and false through value::qnil and its kin ([5919ae0](https://github.com/elct9620/beni/commit/5919ae0aa2a6cbeb7847860114258d67e3bbfddc))
38
+ * **beni:** bind a constant through const_set alone ([738997e](https://github.com/elct9620/beni/commit/738997e7f081b9dcbc65d52393988353b8241ffd))
39
+ * **beni:** coerce a value's type through TryConvert alone ([eecd272](https://github.com/elct9620/beni/commit/eecd272472358153504b5cf30eaab0e102048da1))
40
+ * **beni:** discriminate types only through handle downcasts ([d2615d3](https://github.com/elct9620/beni/commit/d2615d34f85a4d97380417388f7b693697e4871f))
41
+ * **beni:** give the Module and Object traits their own modules ([ab75ec0](https://github.com/elct9620/beni/commit/ab75ec001f58656b1e3201cc1e5b1a861f8f7e14))
42
+ * **beni:** name the array and hash handles RArray and RHash ([70fbca4](https://github.com/elct9620/beni/commit/70fbca43a005fe108a36b637a5b3afd811d980f8))
43
+ * **beni:** name value operations as magnus names them ([f6717a6](https://github.com/elct9620/beni/commit/f6717a658833fb4b3a868ee479fc6bf19ae5d359))
44
+ * **beni:** place value operations on the traits magnus places them on ([1b9ee3f](https://github.com/elct9620/beni/commit/1b9ee3fc1f1d0eccc014a70bea52631bf17c14ba))
45
+ * **beni:** read an array element through the array handle alone ([2329fe2](https://github.com/elct9620/beni/commit/2329fe22ad90ecee25df5bbfe453a9c4e6fc3591))
46
+ * **beni:** remove the cstr! macro and cstr_ptr ([c4cf56e](https://github.com/elct9620/beni/commit/c4cf56e654a3e2b7d4157fbe669d8b9250aae420))
47
+
3
48
  ## [0.18.0](https://github.com/elct9620/beni/compare/v0.17.0...v0.18.0) (2026-09-20)
4
49
 
5
50
 
data/README.md CHANGED
@@ -20,7 +20,7 @@ All four packages release in lockstep under a single version.
20
20
  | `beni` gem | rubygems.org | Rake tasks + DSL config that download mruby and build the archive |
21
21
  | `beni-sys` crate | crates.io | bindgen FFI surface over the mruby C API |
22
22
  | `beni` crate | crates.io | safe typed wrapper over `beni-sys`, aligned with magnus idioms |
23
- | `beni-macros` crate | crates.io | the `beni` crate's `wrap` and `TypedData` macros, used through `beni` |
23
+ | `beni-macros` crate | crates.io | the `beni` crate's `wrap`, `TypedData`, and `InlineStruct` macros, used through `beni` |
24
24
 
25
25
  ## Getting started
26
26
 
data/lib/beni/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Beni
4
- VERSION = "0.18.0"
4
+ VERSION = "0.19.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya