mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
9d8d41006b
`class String; def split` in mruby-regexp/mrblib/string_regexp.rb replaced the C-defined String#split rather than overriding it, so the in-Ruby `return super if pattern.nil?` paths raised NoMethodError for any `"x".split(...)` call once mruby-regexp was loaded (the default full-core production binary). The regression wasn't caught by the test suite because per-gem tests run under mrb_open_core() with only the gem's dep_list, so the broken override is never visible from test/t/string.rb (mruby-test, not mruby-regexp). Add `alias __split split` at the top of the override class body, which captures the C-defined method, and change the Ruby override to delegate via `__split(pattern, limit)` for non-regexp fallback paths. Add a bintest under mruby-bin-mruby that runs through bin/mruby (full gem load) to catch this regression class. Co-authored-by: Claude <noreply@anthropic.com>
mruby-bin-mruby
mruby is the main interpreter for executing Ruby scripts with mruby.
Usage
mruby [switches] [programfile] [arguments]
Options
-b- load and execute RiteBinary (mrb) file-c- check syntax only-d- set debugging flags (set$DEBUGto true)-e 'command'- one line of script-r library- load the library before executing your script-v- print version number, then run in verbose mode--verbose- run in verbose mode--version- print the version--copyright- print the copyright
Examples
# Execute a Ruby script
mruby script.rb
# Execute inline code
mruby -e 'puts "Hello, mruby!"'
# Check syntax without executing
mruby -c script.rb
# Execute a compiled binary
mruby -b script.mrb
# Load a library before running script
mruby -r mruby-io script.rb
# Pass arguments to script
mruby script.rb arg1 arg2
License
MIT License - see the mruby LICENSE file.