From 0a45941337ef852893deeeda23aab3330f3e2e9a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 11 Jun 2025 18:31:52 +0900 Subject: [PATCH] mruby-eval: add README.md The document is written by Google Jules. --- mrbgems/mruby-eval/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 mrbgems/mruby-eval/README.md diff --git a/mrbgems/mruby-eval/README.md b/mrbgems/mruby-eval/README.md new file mode 100644 index 000000000..e53e0699a --- /dev/null +++ b/mrbgems/mruby-eval/README.md @@ -0,0 +1,26 @@ +# mruby-eval + +This mrbgem provides methods for evaluating Ruby code from strings in mruby. + +## Features + +The `mruby-eval` gem implements the following methods: + +- **`eval`**: Evaluates a string as Ruby code. This is a private method on `Kernel`. +- **`instance_eval`**: Evaluates a string or a block within the context of an object. This is a method on `BasicObject`. +- **`class_eval` / `module_eval`**: Evaluates a string or a block within the context of a class or module. This is a method on `Module`. +- **`Binding#eval`**: Evaluates a string within the context of a `Binding` object. + +## Usage + +For detailed usage and examples, please refer to the standard Ruby documentation for these methods. The mruby implementation aims to be compatible with the behavior of these methods in CRuby. + +## Contributing + +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License + +mruby-eval is released under the MIT License. See the [LICENSE.txt](https://github.com/mruby/mruby/blob/master/LICENSE.txt) file in the main mruby repository for details.