Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Allow to mixed and specify
*.rb
and *.mrb
in bin/mruby
It is not decides by the extension. In order to be recognized as a `.mrb` file, the following three points must be satisfied: - File starts with "RITE" - At least `sizeof(struct rite_binary_header)` bytes can be read - `NUL` is included in the first 64 bytes of the file If these are not met, it is judged as a text file and it is processed as a Ruby script. The `bin/mruby -b` switch is still available which treats the given file as a `.mrb` file. New `MRB_API` function: - `include/mruby/compile.h` and `mrbgems/mruby-compiler/core/parse.y` - `mrb_load_detect_file_cxt()` (remove with `MRB_DISABLE_STDIO`) NOTE: - Even script files now always open in binary mode for `bin/mruby`. The `\r\n` is handled by the `nextc()` function already, so there is no problem even on Windows. - The `nextc0()` function in `mrbgems/mruby-compiler/core/parse.y` can now specify a string buffer and a file pointer at the same time. In this case, get it from the string buffer first. This patch includes modifies by comment of #5157.
- Loading branch information
Showing
6 changed files
with
1,151 additions
and
1,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.