Skip to content

Commit 457a50b

Browse files
authored
Merge pull request mruby#6744 from mruby/fix/case-in-no-match-error
2 parents b34b720 + 143959b commit 457a50b

11 files changed

Lines changed: 294 additions & 294 deletions

File tree

doc/README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,59 @@
44

55
New to mruby? Start here:
66

7-
| Document | Description |
8-
| -------- | ----------- |
7+
| Document | Description |
8+
| -------------------------------------------- | -------------------------------------- |
99
| [Getting Started](guides/getting-started.md) | Build mruby and run your first program |
10-
| [Language Features](guides/language.md) | Ruby subset supported by mruby |
11-
| [Limitations](limitations.md) | Behavioral differences from CRuby |
10+
| [Language Features](guides/language.md) | Ruby subset supported by mruby |
11+
| [Limitations](limitations.md) | Behavioral differences from CRuby |
1212

1313
## Guides (for embedders and gem authors)
1414

1515
### Embedding mruby in C
1616

17-
| Document | Description |
18-
| -------- | ----------- |
19-
| [C API Reference](guides/capi.md) | Values, classes, methods, error handling, fibers |
20-
| [GC Arena](guides/gc-arena-howto.md) | Managing temporary objects in C extensions |
21-
| [Linking](guides/link.md) | Linking with `libmruby` |
22-
| [Amalgamation](guides/amalgamation.md) | Single-file build for easy integration |
23-
| [Precompiled Symbols](guides/symbol.md) | Compile-time symbol allocation |
17+
| Document | Description |
18+
| --------------------------------------- | ------------------------------------------------ |
19+
| [C API Reference](guides/capi.md) | Values, classes, methods, error handling, fibers |
20+
| [GC Arena](guides/gc-arena-howto.md) | Managing temporary objects in C extensions |
21+
| [Linking](guides/link.md) | Linking with `libmruby` |
22+
| [Amalgamation](guides/amalgamation.md) | Single-file build for easy integration |
23+
| [Precompiled Symbols](guides/symbol.md) | Compile-time symbol allocation |
2424

2525
### Building and Configuring
2626

27-
| Document | Description |
28-
| -------- | ----------- |
29-
| [Compilation](guides/compile.md) | Build system, cross-compilation, toolchains |
30-
| [Build Configuration](guides/mrbconf.md) | Compile-time macros (`MRB_*` flags) |
31-
| [mrbgems](guides/mrbgems.md) | Creating and managing gems |
32-
| [Memory](guides/memory.md) | Allocator customization and heap regions |
27+
| Document | Description |
28+
| ---------------------------------------- | ------------------------------------------- |
29+
| [Compilation](guides/compile.md) | Build system, cross-compilation, toolchains |
30+
| [Build Configuration](guides/mrbconf.md) | Compile-time macros (`MRB_*` flags) |
31+
| [mrbgems](guides/mrbgems.md) | Creating and managing gems |
32+
| [Memory](guides/memory.md) | Allocator customization and heap regions |
3333

3434
### Tools
3535

36-
| Document | Description |
37-
| -------- | ----------- |
38-
| [Debugger](guides/debugger.md) | Using `mrdb` for debugging |
36+
| Document | Description |
37+
| ----------------------------------------------- | ----------------------------------------------- |
38+
| [Debugger](guides/debugger.md) | Using `mrdb` for debugging |
3939
| [ROM Method Tables](guides/rom-method-table.md) | Read-only method tables for constrained devices |
4040

4141
### Reference
4242

43-
| Document | Description |
44-
| -------- | ----------- |
43+
| Document | Description |
44+
| ------------------------------------- | ------------------ |
4545
| [Directory Structure](guides/hier.md) | Source tree layout |
4646

4747
## Internals (for mruby contributors)
4848

4949
Start with [Architecture](internal/architecture.md) for an overview,
5050
then dive into the subsystem you need:
5151

52-
| Document | Description |
53-
| -------- | ----------- |
54-
| [Architecture](internal/architecture.md) | Overview of object model, VM, GC, compiler |
55-
| [Virtual Machine](internal/vm.md) | Dispatch loop, call frames, method lookup, fibers |
56-
| [Garbage Collector](internal/gc.md) | Tri-color marking, write barriers, generational GC |
57-
| [Compiler Pipeline](internal/compiler.md) | Parser, code generator, IRep, binary format |
58-
| [Opcodes](internal/opcode.md) | VM instruction set reference |
59-
| [Value Boxing](internal/boxing.md) | How `mrb_value` encodes types |
52+
| Document | Description |
53+
| ----------------------------------------- | -------------------------------------------------- |
54+
| [Architecture](internal/architecture.md) | Overview of object model, VM, GC, compiler |
55+
| [Virtual Machine](internal/vm.md) | Dispatch loop, call frames, method lookup, fibers |
56+
| [Garbage Collector](internal/gc.md) | Tri-color marking, write barriers, generational GC |
57+
| [Compiler Pipeline](internal/compiler.md) | Parser, code generator, IRep, binary format |
58+
| [Opcodes](internal/opcode.md) | VM instruction set reference |
59+
| [Value Boxing](internal/boxing.md) | How `mrb_value` encodes types |
6060

6161
## Release Notes
6262

doc/guides/language.md

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ mruby's numeric type sizes depend on the boxing mode and platform.
205205

206206
### Integer
207207

208-
| Configuration | Range |
209-
| ------------- | ----- |
208+
| Configuration | Range |
209+
| -------------------------------------- | ---------------- |
210210
| 64-bit word boxing (default on 64-bit) | roughly +/- 2^62 |
211211
| 32-bit word boxing (default on 32-bit) | roughly +/- 2^30 |
212-
| NaN boxing (64-bit only) | -2^31 to 2^31-1 |
212+
| NaN boxing (64-bit only) | -2^31 to 2^31-1 |
213213

214214
Integer overflow raises a `RangeError` unless the `mruby-bigint` gem
215215
is included, in which case integers automatically promote to
@@ -235,32 +235,32 @@ With word boxing on 64-bit, many float values are stored inline
235235

236236
These classes are always available in mruby (no gem required):
237237

238-
| Class | Notes |
239-
| ----- | ----- |
240-
| Object | Base class for all objects |
241-
| Module | Module definition and mixin |
242-
| Class | Class definition and instantiation |
243-
| NilClass | Singleton `nil` |
244-
| TrueClass | Singleton `true` |
245-
| FalseClass | Singleton `false` |
246-
| Integer | Fixed-precision integer |
247-
| Float | Floating-point (unless `MRB_NO_FLOAT`) |
248-
| Symbol | Interned identifier |
249-
| String | Mutable byte string |
250-
| Array | Ordered collection |
251-
| Hash | Key-value mapping |
252-
| Range | Interval representation |
253-
| Proc | Closure / callable object |
254-
| Exception | Exception hierarchy root |
255-
| StandardError | Common error base |
238+
| Class | Notes |
239+
| ------------- | -------------------------------------- |
240+
| Object | Base class for all objects |
241+
| Module | Module definition and mixin |
242+
| Class | Class definition and instantiation |
243+
| NilClass | Singleton `nil` |
244+
| TrueClass | Singleton `true` |
245+
| FalseClass | Singleton `false` |
246+
| Integer | Fixed-precision integer |
247+
| Float | Floating-point (unless `MRB_NO_FLOAT`) |
248+
| Symbol | Interned identifier |
249+
| String | Mutable byte string |
250+
| Array | Ordered collection |
251+
| Hash | Key-value mapping |
252+
| Range | Interval representation |
253+
| Proc | Closure / callable object |
254+
| Exception | Exception hierarchy root |
255+
| StandardError | Common error base |
256256

257257
### Core Modules
258258

259-
| Module | Notes |
260-
| ------ | ----- |
261-
| Kernel | Core methods (`puts`, `p`, `raise`, etc.) |
262-
| Comparable | Comparison operators via `<=>` |
263-
| Enumerable | Collection iteration methods |
259+
| Module | Notes |
260+
| ---------- | ----------------------------------------- |
261+
| Kernel | Core methods (`puts`, `p`, `raise`, etc.) |
262+
| Comparable | Comparison operators via `<=>` |
263+
| Enumerable | Collection iteration methods |
264264

265265
## Standard Library (via gemboxes)
266266

@@ -270,70 +270,70 @@ gembox provides the class or feature you need:
270270

271271
### Classes and Modules
272272

273-
| Class/Module | Gembox | Gem |
274-
| ------------ | ------ | --- |
275-
| Fiber | stdlib | mruby-fiber |
276-
| Enumerator | stdlib | mruby-enumerator |
277-
| Enumerator::Lazy | stdlib | mruby-enum-lazy |
278-
| Set | stdlib | mruby-set |
279-
| ObjectSpace | stdlib | mruby-objectspace |
280-
| Time | stdlib-ext | mruby-time |
281-
| Struct | stdlib-ext | mruby-struct |
282-
| Data | stdlib-ext | mruby-data |
283-
| Random | stdlib-ext | mruby-random |
284-
| IO, File | stdlib-io | mruby-io |
285-
| Socket | stdlib-io | mruby-socket |
286-
| Dir | stdlib-io | mruby-dir |
287-
| Errno | stdlib-io | mruby-errno |
288-
| Math | math | mruby-math |
289-
| Rational | math | mruby-rational |
290-
| Complex | math | mruby-complex |
291-
| Bigint | math | mruby-bigint |
292-
| Method, UnboundMethod | metaprog | mruby-method |
273+
| Class/Module | Gembox | Gem |
274+
| --------------------- | ---------- | ----------------- |
275+
| Fiber | stdlib | mruby-fiber |
276+
| Enumerator | stdlib | mruby-enumerator |
277+
| Enumerator::Lazy | stdlib | mruby-enum-lazy |
278+
| Set | stdlib | mruby-set |
279+
| ObjectSpace | stdlib | mruby-objectspace |
280+
| Time | stdlib-ext | mruby-time |
281+
| Struct | stdlib-ext | mruby-struct |
282+
| Data | stdlib-ext | mruby-data |
283+
| Random | stdlib-ext | mruby-random |
284+
| IO, File | stdlib-io | mruby-io |
285+
| Socket | stdlib-io | mruby-socket |
286+
| Dir | stdlib-io | mruby-dir |
287+
| Errno | stdlib-io | mruby-errno |
288+
| Math | math | mruby-math |
289+
| Rational | math | mruby-rational |
290+
| Complex | math | mruby-complex |
291+
| Bigint | math | mruby-bigint |
292+
| Method, UnboundMethod | metaprog | mruby-method |
293293

294294
### Methods and Features
295295

296-
| Feature | Gembox | Gem |
297-
| ------- | ------ | --- |
298-
| `catch`/`throw` | stdlib | mruby-catch |
299-
| `Kernel#sprintf`, `String#%` | stdlib-ext | mruby-sprintf |
300-
| `Array#pack`, `String#unpack` | stdlib-ext | mruby-pack |
301-
| `Kernel#rand` | stdlib-ext | mruby-random |
302-
| `Kernel#eval` | metaprog | mruby-eval |
303-
| `Kernel#binding` | metaprog | mruby-binding |
304-
| `Proc#binding` | metaprog | mruby-proc-binding |
305-
| Runtime compiler | metaprog | mruby-compiler |
296+
| Feature | Gembox | Gem |
297+
| ----------------------------- | ---------- | ------------------ |
298+
| `catch`/`throw` | stdlib | mruby-catch |
299+
| `Kernel#sprintf`, `String#%` | stdlib-ext | mruby-sprintf |
300+
| `Array#pack`, `String#unpack` | stdlib-ext | mruby-pack |
301+
| `Kernel#rand` | stdlib-ext | mruby-random |
302+
| `Kernel#eval` | metaprog | mruby-eval |
303+
| `Kernel#binding` | metaprog | mruby-binding |
304+
| `Proc#binding` | metaprog | mruby-proc-binding |
305+
| Runtime compiler | metaprog | mruby-compiler |
306306

307307
### Core Class Extensions
308308

309309
The `stdlib` gembox also extends built-in classes with additional
310310
methods. These are included by default:
311311

312-
| Extension | Examples |
313-
| --------- | -------- |
314-
| Array extensions | `#dig`, `#union`, `#difference` |
315-
| Hash extensions | `#dig`, `#transform_keys`, `#transform_values` |
316-
| String extensions | `#encode`, `#bytes`, `#chars` |
317-
| Numeric extensions | `Integer#digits`, `Integer#pow` |
318-
| Comparable extensions | `#clamp` |
319-
| Enumerable extensions | `#sort_by`, `#min_by`, `#max_by`, `#tally` |
320-
| Range extensions | `#size`, `#cover?` |
321-
| Proc extensions | `#<<`, `#>>` (composition) |
322-
| Symbol extensions | `#to_proc` |
323-
| Object extensions | `#then`, `#yield_self` |
324-
| Kernel extensions | `#__method__` |
325-
| Class/Module extensions | `Module#name` |
312+
| Extension | Examples |
313+
| ----------------------- | ---------------------------------------------- |
314+
| Array extensions | `#dig`, `#union`, `#difference` |
315+
| Hash extensions | `#dig`, `#transform_keys`, `#transform_values` |
316+
| String extensions | `#encode`, `#bytes`, `#chars` |
317+
| Numeric extensions | `Integer#digits`, `Integer#pow` |
318+
| Comparable extensions | `#clamp` |
319+
| Enumerable extensions | `#sort_by`, `#min_by`, `#max_by`, `#tally` |
320+
| Range extensions | `#size`, `#cover?` |
321+
| Proc extensions | `#<<`, `#>>` (composition) |
322+
| Symbol extensions | `#to_proc` |
323+
| Object extensions | `#then`, `#yield_self` |
324+
| Kernel extensions | `#__method__` |
325+
| Class/Module extensions | `Module#name` |
326326

327327
### Gembox Summary
328328

329-
| Gembox | Contents | Notes |
330-
| ------ | -------- | ----- |
331-
| `stdlib` | Core class extensions, Fiber, Enumerator, Set | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
332-
| `stdlib-ext` | Time, Struct, Data, Random, sprintf, pack | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
333-
| `stdlib-io` | IO, File, Dir, Socket, Errno | Requires stdio |
334-
| `math` | Math, Rational, Complex, Bigint | Works with `MRB_NO_STDIO` |
335-
| `metaprog` | eval, binding, Method, compiler | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
336-
| `default` | All of the above + CLI tools | Full installation |
329+
| Gembox | Contents | Notes |
330+
| ------------ | --------------------------------------------- | -------------------------------------------- |
331+
| `stdlib` | Core class extensions, Fiber, Enumerator, Set | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
332+
| `stdlib-ext` | Time, Struct, Data, Random, sprintf, pack | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
333+
| `stdlib-io` | IO, File, Dir, Socket, Errno | Requires stdio |
334+
| `math` | Math, Rational, Complex, Bigint | Works with `MRB_NO_STDIO` |
335+
| `metaprog` | eval, binding, Method, compiler | Works with `MRB_NO_STDIO` and `MRB_NO_FLOAT` |
336+
| `default` | All of the above + CLI tools | Full installation |
337337

338338
## Key Differences from CRuby
339339

@@ -416,15 +416,15 @@ differently on 32-bit or NaN boxing configurations.
416416

417417
Key compile-time macros that affect language behavior:
418418

419-
| Macro | Effect |
420-
| ----- | ------ |
421-
| `MRB_NO_FLOAT` | Remove all float support |
422-
| `MRB_USE_FLOAT32` | Use 32-bit float instead of double |
423-
| `MRB_UTF8_STRING` | Enable UTF-8 string handling |
424-
| `MRB_INT32` | Force 32-bit integer |
425-
| `MRB_INT64` | Force 64-bit integer |
426-
| `MRB_STR_LENGTH_MAX` | Max string length (default 1MB) |
427-
| `MRB_ARY_LENGTH_MAX` | Max array length (default 2^17) |
419+
| Macro | Effect |
420+
| -------------------- | ---------------------------------- |
421+
| `MRB_NO_FLOAT` | Remove all float support |
422+
| `MRB_USE_FLOAT32` | Use 32-bit float instead of double |
423+
| `MRB_UTF8_STRING` | Enable UTF-8 string handling |
424+
| `MRB_INT32` | Force 32-bit integer |
425+
| `MRB_INT64` | Force 64-bit integer |
426+
| `MRB_STR_LENGTH_MAX` | Max string length (default 1MB) |
427+
| `MRB_ARY_LENGTH_MAX` | Max array length (default 2^17) |
428428

429429
See [mrbconf.md](mrbconf.md) for the complete list of configuration
430430
macros.

doc/guides/memory.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ any other heap page. The only differences are:
202202
The page size is controlled by `MRB_HEAP_PAGE_SIZE` (default: 1024 slots).
203203
Each page occupies:
204204
205-
| Platform | Slot size | Page size (approx) |
206-
|----------|-----------|---------------------|
207-
| 64-bit | 40 bytes | ~41 KB |
208-
| 32-bit | 24 bytes | ~25 KB |
205+
| Platform | Slot size | Page size (approx) |
206+
| -------- | --------- | ------------------ |
207+
| 64-bit | 40 bytes | ~41 KB |
208+
| 32-bit | 24 bytes | ~25 KB |
209209
210210
To estimate pages for a given buffer: `pages = buffer_size / sizeof(mrb_heap_page)`.
211211
Each page provides `MRB_HEAP_PAGE_SIZE` object slots.

0 commit comments

Comments
 (0)