1. 25 Nov, 2020 2 commits
  2. 24 Nov, 2020 9 commits
  3. 23 Nov, 2020 11 commits
  4. 22 Nov, 2020 12 commits
  5. 21 Nov, 2020 6 commits
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #5167 from dearblue/singleton-method · e02d0ff7
      Yukihiro "Matz" Matsumoto authored
      Improved `Object#define_singleton_method`
      e02d0ff7
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #5166 from shuujii/rename-MRB_ENABLE-DISABLE_-to-MRB_USE-NO_ · 049e749c
      Yukihiro "Matz" Matsumoto authored
      Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163
      049e749c
    • dearblue's avatar
      Improved `Object#define_singleton_method` · b2bfcaba
      dearblue authored
      Integrate the implementation with `Module#define_method`.
      
      - Introduce the internal function `mrb_mod_define_method_m()` (no static)
      - The `Object#define_singleton_method` method can now accept a second argument
      b2bfcaba
    • KOBAYASHI Shuji's avatar
      Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163 · 3d056d08
      KOBAYASHI Shuji authored
      |        Previous Name         |        New Name         |
      |------------------------------|-------------------------|
      | MRB_ENABLE_ALL_SYMBOLS       | MRB_USE_ALL_SYMBOLS     |
      | MRB_ENABLE_SYMBOLL_ALL       | MRB_USE_ALL_SYMBOLS     |
      | MRB_ENABLE_CXX_ABI           | MRB_USE_CXX_ABI         |
      | MRB_ENABLE_CXX_EXCEPTION     | MRB_USE_CXX_EXCEPTION   |
      | MRB_ENABLE_DEBUG_HOOK        | MRB_USE_DEBUG_HOOK      |
      | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING |
      | MRB_DISABLE_STDIO            | MRB_NO_STDIO            |
      | ENABLE_LINENOISE             | MRB_USE_LINENOISE       |
      | ENABLE_READLINE              | MRB_USE_READLINE        |
      | DISABLE_MIRB_UNDERSCORE      | MRB_NO_MIRB_UNDERSCORE  |
      | DISABLE_GEMS                 | MRB_NO_GEMS             |
      
      * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed.
      * `MRB_` prefix is added to those without.
      * The previous names can also be used for compatibility.
      3d056d08
    • Yukihiro "Matz" Matsumoto's avatar
      Merge pull request #5157 from dearblue/detect-rb-mrb · 544784ef
      Yukihiro "Matz" Matsumoto authored
      Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby`
      544784ef
    • dearblue's avatar
      Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby` · a045b6b8
      dearblue authored
      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 https://github.com/mruby/mruby/pull/5157.
      a045b6b8