beni 0.18.0 → 0.20.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 +86 -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: d5f307db03f9e91e2762e738582b499dd615c38865dfc94c413c2746c9e62b54
4
+ data.tar.gz: 709bf294599df8f0efcf5d62800af532bc81c1b1837fac49e895aa328b9f915c
5
5
  SHA512:
6
- metadata.gz: 68cad9299f8edb171c67b9b69ec3bbb3ca14fc1cc5a1551d6f5e658494520028fd150b9c0a4b0b709df6b68e5c7335919fb90386b020a1c6de38a0b8936cc22d
7
- data.tar.gz: d7b8d216a9841212606205820403936d5272371b0a506dcb5c4ea1c9f51fa34c3f6ffe84a6099b47d31cc169f167e771a9761c3c59c78b01d69896c294efb262
6
+ metadata.gz: d84d4a6be69bab3950dcdbb0a64c5009178c9b90ec955f942c3565174743b051c0dde0de7db579e9356c717a6ce39a9e951dbe33bae9a01e9cc6d76697880cb7
7
+ data.tar.gz: 82b3100cf8746ed778b70e0021bfa04eb039a66d5605ce7233bd040c77aeaba740bf040b75c9b607d67c7e5d514ab10d220de185b5cf28bbb27e8faba9be6438
data/CHANGELOG.md CHANGED
@@ -1,5 +1,91 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.20.0](https://github.com/elct9620/beni/compare/v0.19.0...v0.20.0) (2026-10-05)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **beni:** `beni::ReturnValue` and `beni::BlockReturn` are now
9
+ * **beni:** seal the method return seam as ReturnValue
10
+ * **beni:** `Mrb::intern_check` is renamed to `Mrb::check_id`.
11
+ * **beni:** a function registered through `method!(f, -1)` takes a trailing `&[Value]`, as does `Dup::clone`; `Mrb::argc` and `Mrb::argv` are removed — read the slice instead.
12
+
13
+ ### Features
14
+
15
+ * **beni:** build a Proc whose body is a Rust function or closure ([a6c0655](https://github.com/elct9620/beni/commit/a6c06551814a3174e46a9f4b4360aaf8ae8f1037))
16
+ * **beni:** check a name's symbol as well as its id ([cc9fb59](https://github.com/elct9620/beni/commit/cc9fb59e2df22e4599c7c05532b1f0ab3750d407))
17
+ * **beni:** create, resume, and test fibers behind a fiber feature ([aaeb682](https://github.com/elct9620/beni/commit/aaeb682f5f88a19057dbdfa60e392b830357f92d))
18
+ * **beni:** read the current fiber on the Mrb handle ([fdc7e4c](https://github.com/elct9620/beni/commit/fdc7e4c186adfd7c91d8d1dd47b986a71acd1201))
19
+ * **beni:** suspend a fiber by returning a fiber yield ([f5ad4b6](https://github.com/elct9620/beni/commit/f5ad4b6ebb2181c579d675472c82665832b55bcb))
20
+ * **beni:** take a frozen copy of a string ([a1bcb4d](https://github.com/elct9620/beni/commit/a1bcb4d4f3f90aa4ae376f14a5036b75ca942bf8))
21
+ * **beni:** view an array's elements in place as a borrowed slice ([1b6c00a](https://github.com/elct9620/beni/commit/1b6c00a84b1e0bcaaccf14e771bffd52ee00c661))
22
+ * **beni:** write a warning or report a bug to standard error ([6025d1a](https://github.com/elct9620/beni/commit/6025d1afb6acb7a2b1fc923ed1415545faf5b7b2))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **beni:** read the carrier record without dispatch or protect frames ([da3edb5](https://github.com/elct9620/beni/commit/da3edb5b34287c3465e387e9a998e2813959fca0))
28
+
29
+
30
+ ### Performance Improvements
31
+
32
+ * **beni:** hold a short fiber yield's arguments without a heap allocation ([30a93f3](https://github.com/elct9620/beni/commit/30a93f3d073a2f1f6b07eb4c13f4d3e285694c3e))
33
+ * **beni:** read a keyword-less any-arity call's arguments without a format parse ([010c706](https://github.com/elct9620/beni/commit/010c706b880ff656f9ba5d27c6a7854a740c6f08))
34
+ * **beni:** read an any-arity call's keywords only when it passed some ([c49d321](https://github.com/elct9620/beni/commit/c49d32166defd87234028caf732074803a16bb34))
35
+
36
+
37
+ ### Code Refactoring
38
+
39
+ * **beni:** hand an any-arity method its arguments as a slice ([ffffb11](https://github.com/elct9620/beni/commit/ffffb11ee113302c4fa7e84f5f98cdb5f2bce9e1))
40
+ * **beni:** keep the return seams under beni::method as magnus does ([3f34ca2](https://github.com/elct9620/beni/commit/3f34ca2ea717b663131435d8a5a2203c37e1cd7e))
41
+ * **beni:** name the id existence check check_id ([a125459](https://github.com/elct9620/beni/commit/a12545958cea38b050f35d90a5b33bf5026b3ce2))
42
+ * **beni:** seal the method return seam as ReturnValue ([b40ba88](https://github.com/elct9620/beni/commit/b40ba8886d128f5db13d7c9425146ed29948a8b7))
43
+
44
+ ## [0.19.0](https://github.com/elct9620/beni/compare/v0.18.0...v0.19.0) (2026-10-03)
45
+
46
+
47
+ ### ⚠ BREAKING CHANGES
48
+
49
+ * **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)`.
50
+ * **beni:** `beni::class::Module` and `beni::class::Object` move to
51
+ * **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.
52
+ * **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`.
53
+ * **beni:** `beni::cstr!` and `beni::cstr_ptr` are removed; write a `c"..."` literal and call `.as_ptr()` on it.
54
+ * **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`.
55
+ * **beni:** `Value::ary_entry` is removed — downcast with
56
+ * **beni:** `Value::unbox_integer` and `Value::unbox_float` are no longer public — read through `Integer::from_value(v)?.to_i64(mrb)` or
57
+ * **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
58
+ * **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`.
59
+ * **beni:** `beni::Array` is now `beni::RArray` and `beni::Hash` is now `beni::RHash`; their methods and conversions are unchanged.
60
+
61
+ ### Features
62
+
63
+ * **beni-macros:** derive InlineStruct and wrap a struct inline ([72c8abb](https://github.com/elct9620/beni/commit/72c8abb143ff577d46eede6864d0a20912b9e8b4))
64
+ * **beni-sys:** bind mruby's inline-struct header ([293271c](https://github.com/elct9620/beni/commit/293271cf4d91c31c802c686dc1e5a706065f54df))
65
+ * **beni:** convert a value into a handle for every tag it can carry ([ddccea7](https://github.com/elct9620/beni/commit/ddccea7af2729b6d6fce6281a253081756f0c164))
66
+ * **beni:** read an Integer or Float handle out as a Rust number ([8514850](https://github.com/elct9620/beni/commit/8514850fe646660a38e2e500cdf79a4e725e33d8))
67
+ * **beni:** store plain Rust data inside mruby objects as inline structs ([2cbfb91](https://github.com/elct9620/beni/commit/2cbfb91e2229861f719035b8c8a57a24b88cc8a5))
68
+ * **beni:** take a method argument as any tagged handle ([29d87f8](https://github.com/elct9620/beni/commit/29d87f89afaff29b219d7c0715101fe45947e7d2))
69
+
70
+
71
+ ### Bug Fixes
72
+
73
+ * **beni:** answer the C-pointer and inline-struct tags with predicates ([db5362c](https://github.com/elct9620/beni/commit/db5362cfedb1dd7ffd7576fa7d79311e86154150))
74
+
75
+
76
+ ### Code Refactoring
77
+
78
+ * **beni:** answer nil, true, and false through value::qnil and its kin ([5919ae0](https://github.com/elct9620/beni/commit/5919ae0aa2a6cbeb7847860114258d67e3bbfddc))
79
+ * **beni:** bind a constant through const_set alone ([738997e](https://github.com/elct9620/beni/commit/738997e7f081b9dcbc65d52393988353b8241ffd))
80
+ * **beni:** coerce a value's type through TryConvert alone ([eecd272](https://github.com/elct9620/beni/commit/eecd272472358153504b5cf30eaab0e102048da1))
81
+ * **beni:** discriminate types only through handle downcasts ([d2615d3](https://github.com/elct9620/beni/commit/d2615d34f85a4d97380417388f7b693697e4871f))
82
+ * **beni:** give the Module and Object traits their own modules ([ab75ec0](https://github.com/elct9620/beni/commit/ab75ec001f58656b1e3201cc1e5b1a861f8f7e14))
83
+ * **beni:** name the array and hash handles RArray and RHash ([70fbca4](https://github.com/elct9620/beni/commit/70fbca43a005fe108a36b637a5b3afd811d980f8))
84
+ * **beni:** name value operations as magnus names them ([f6717a6](https://github.com/elct9620/beni/commit/f6717a658833fb4b3a868ee479fc6bf19ae5d359))
85
+ * **beni:** place value operations on the traits magnus places them on ([1b9ee3f](https://github.com/elct9620/beni/commit/1b9ee3fc1f1d0eccc014a70bea52631bf17c14ba))
86
+ * **beni:** read an array element through the array handle alone ([2329fe2](https://github.com/elct9620/beni/commit/2329fe22ad90ecee25df5bbfe453a9c4e6fc3591))
87
+ * **beni:** remove the cstr! macro and cstr_ptr ([c4cf56e](https://github.com/elct9620/beni/commit/c4cf56e654a3e2b7d4157fbe669d8b9250aae420))
88
+
3
89
  ## [0.18.0](https://github.com/elct9620/beni/compare/v0.17.0...v0.18.0) (2026-09-20)
4
90
 
5
91
 
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.20.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.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya