15 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 8956c5abb5 mruby.h: include mruby/presym.h for all source files
Since presym is now mandatory, mruby.h includes presym.h so that
MRB_SYM() macros are available everywhere without explicit include.
Remove redundant #include <mruby/presym.h> from all source files.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:58 +09:00
Yukihiro "Matz" Matsumoto 75a2a59637 mruby-proc-binding: combine variable declaration with initialization 2025-11-08 14:24:40 +09:00
Yukihiro "Matz" Matsumoto 2ac600dd8b mruby-proc-binding: add comprehensive call-seq documentation and helper function comments
Added complete call-seq documentation for proc binding functionality across
both source and test files:

## Core Implementation (src/proc_binding.c):

### Main Method:
- binding: returns Binding object capturing proc's execution context,
  includes comprehensive examples showing local variable access, parameter
  binding, and scope retention with practical usage patterns

### Helper Functions:
- mrb_mruby_proc_binding_gem_init: initializes gem by adding binding method
  to Proc class, explains method signature and return type behavior

Co-authored-by: Atlassian Rovo Dev
2025-07-17 12:53:58 +09:00
Yukihiro "Matz" Matsumoto 0b52b33597 mruby-proc-binding: add README.md
The document is written by Google Jules.
2025-06-11 18:38:14 +09:00
John Bampton 4f2f2cfd20 Add ls-lint with GitHub Actions
Rename files in the `mrbgems` directory
2025-05-14 01:14:02 +10:00
Yukihiro "Matz" Matsumoto 2b4591fe68 mruby-proc-binding: use presym for initialization 2024-06-14 01:45:23 +09:00
Yukihiro "Matz" Matsumoto b52870b4c6 mruby-method: add const modifier to struct RProc* 2023-12-03 22:38:29 +09:00
dearblue 0e00d8e224 Integrate mruby-binding-eval into mruby-eval
Currently mruby-eval depends on mruby-binding (formerly mruby-binding-core).
Also, `Kernel#eval` can accept `binding` objects.
With this in mind, it would be better if `Binding#eval` could also be handled by `mrbgems/mruby-eval`.
2023-04-16 21:44:00 +09:00
Yukihiro "Matz" Matsumoto 11af5db1c3 mruby-binding: renamed from mruby-binding-core
The dependency is now:

mruby-binding-eval:

  - mruby-binding
  - mruby-eval

mruby-proc-binding:

  - mruby-binding

mruby-eval:

  - mruby-binding [new]
2023-03-24 12:25:57 +09:00
Yukihiro "Matz" Matsumoto 501b22a2ac mruby-binding-eval: renamed from mruby-binding
Since this gem only provides `Binding#eval`.
2023-03-22 15:25:23 +09:00
Yukihiro "Matz" Matsumoto 66ca9722b6 mruby-binding-core (mrb_binding_new): new function
Use this function instead of `mrb_binding_alloc` (removed).
2023-03-21 16:17:08 +09:00
Yukihiro "Matz" Matsumoto 35e2779575 Small cosmetic changes (adjust indent, and remove extra space) 2023-03-21 16:10:15 +09:00
dearblue 6adbbd8773 Needs mruby-proc-ext by mruby-proc-binding
The `mruby-proc_source_location()` function used in `src/proc-binding.c` of `mruby-proc-binding` is defined in `mruby-proc-ext`.
2022-10-21 21:44:06 +09:00
Yukihiro "Matz" Matsumoto 43f6f765b0 Remove unused prototypes for mrb_proc_merge_lvar(); ref #5511 2021-07-19 07:42:49 +09:00
dearblue 927615e1f0 Added other methods for Binding
- Added to `mruby-binding-core`
  - `Binding#local_variable_defined?`
  - `Binding#local_variable_get`
  - `Binding#local_variable_set`
  - `Binding#local_variables`
  - `Binding#receiver`
  - `Binding#source_location`
  - `Binding#inspect`
- Added to `mruby-proc-binding`
  - `Proc#binding`

The reason for separating `Proc#binding` is that core-mrbgems has a method that returns a closure object to minimize possible problems with being able to manipulate internal variables.
By separating it as different mrbgem, each user can judge this problem and incorporate it arbitrarily.
2021-02-22 23:32:43 +09:00