Commit Graph

14800 Commits

Author SHA1 Message Date
dearblue aac2fd7055 Copy header files to the build directory
This is so that the build directory can be regarded as a temporary installation directory to work in.

Directories set in `MRuby::Gem::Specification#export_include_paths` are used as they are if they are subdirectories placed under `gem.dir`.
Files are placed under `<build-dir>/include/mruby/gems/<gem-name>/<gem-include_paths>` to separate each GEM.

When GEM is compiled by building `libmruby.a`, the same `include_paths` will be set as before, so it is expected that no unintended references will be made.
2023-02-12 21:02:28 +09:00
dearblue c020d8507e Separate rake install related stuff into tasks/install.rake 2023-02-12 21:02:27 +09:00
Yukihiro "Matz" Matsumoto bed7a79add Merge pull request #5927 from jbampton/remove-unneeded-whitespace
md/yml: remove unneeded blank lines and whitespace
2023-02-10 14:24:47 +09:00
Yukihiro "Matz" Matsumoto 7373b63919 Merge pull request #5926 from jbampton/update-license-year
Update License year to 2023
2023-02-10 14:23:32 +09:00
John Bampton 07a7d2a6cb md/yml: remove unneeded blank lines and whitespace 2023-02-10 14:02:57 +10:00
John Bampton 8af0aa4905 Update License year to 2023 2023-02-10 11:55:32 +10:00
Yukihiro "Matz" Matsumoto fc53cd20b6 Merge pull request #5925 from jbampton/update-authors-file
AUTHORS: update "as of" info for `year`
2023-02-08 06:38:31 +09:00
Yukihiro "Matz" Matsumoto 75bdb4e0ec Merge pull request #5924 from dearblue/exception-classes
Improve consistency of how error classes are retrieved
2023-02-08 06:30:34 +09:00
Yukihiro "Matz" Matsumoto 8a2bb9eb93 Merge pull request #5923 from dearblue/mrb_f_raise
Demotion `mrb_f_raise()` from `MRB_API`
2023-02-08 06:30:17 +09:00
John Bampton 5189d73d6d AUTHORS: update "as of" info for year
The AUTHORS file was last published on January 8th 2023
2023-02-08 03:29:10 +10:00
dearblue a93807f48f Improve consistency of how error classes are retrieved 2023-02-07 22:46:56 +09:00
dearblue 0898ce982e Demotion mrb_f_raise() from MRB_API
This function is the entity of the `Kernel.#raise` or `Kernel#fail` method.
I don't think users can use it whenever they want, and I don't think there is any need to expose it as an entity of a user-defined method.
2023-02-07 22:37:58 +09:00
Yukihiro "Matz" Matsumoto 78141d17f1 mruby-bin-mirb: fix multi-line input issue; fix #5922
Bison changed the message for the end-of-file error. `mirb` should
be updated for the new message.
2023-02-07 15:45:11 +09:00
Yukihiro "Matz" Matsumoto a25755060c mruby-bin-mirb: add bintest for multi-line input; ref #5922 2023-02-07 15:44:50 +09:00
Yukihiro "Matz" Matsumoto 6ca1b8e4e7 mruby-catch/catch.c: update disasm comment for new output format 2023-02-06 11:21:52 +09:00
Yukihiro "Matz" Matsumoto 7e607c67f2 codedump.c: adjust output format for ireps and literals
- I(%d:%p) -> I[%d]
- L(%d) -> L[%d]

The irep address is not useful, so just print index in reps table.
And use `[]` instead of `()` to clarify they are index.
2023-02-06 11:13:48 +09:00
Yukihiro "Matz" Matsumoto 1e122f7887 mruby-catch/catch.c: add disassembled comment for catch irep 2023-02-05 22:53:11 +09:00
Yukihiro "Matz" Matsumoto acecee0da1 mruby-print/print.c: rename __printstr__ to __printstr
As a convention other internal methods are prefixed by `__`.
2023-02-04 18:58:07 +09:00
Yukihiro "Matz" Matsumoto 1273c04e26 mruby-print/print.rb: update ISO references 2023-02-04 18:57:43 +09:00
Yukihiro "Matz" Matsumoto 8c8bbd94dc error.c: add new error handling API functions; ref #2837
- mrb_clear_error(): clear error status of mrb_state
- mrb_check_error(): check if error caused in the previous API

Note that `mrb_check_error` clears error status, so if you call
`mrb_check_error` more than once, latter calls will return FALSE.
2023-02-03 14:28:24 +09:00
Yukihiro "Matz" Matsumoto f5a7b6aad2 hash.rb: defer local variable initialization 2023-02-02 22:45:30 +09:00
Yukihiro "Matz" Matsumoto 1b299addaf mruby-hash-ext/hash.rb: implement Hash#compact! in C
Using `__compact` method defined in the core, since hash access
functions are private to `src/hash.c`.
2023-02-02 22:44:04 +09:00
Yukihiro "Matz" Matsumoto 9cda737a56 mruby-hash-ext/test: test Hash#compact! returns nil if unmodified 2023-02-02 22:42:36 +09:00
Yukihiro "Matz" Matsumoto 0a1fd07910 mruby-time/time.c: implement weekday methods in C 2023-02-01 14:33:46 +09:00
Yukihiro "Matz" Matsumoto ecd2d8c11e wrap method arguments by parentheses as convention 2023-02-01 14:33:46 +09:00
Yukihiro "Matz" Matsumoto caac15e8e1 Merge pull request #5919 from jbampton/make-rake-add-target
Makefile/Rakefile add target/task for `pre-commit install`
2023-02-01 14:29:40 +09:00
Yukihiro "Matz" Matsumoto 2dcc7346b4 Merge pull request #5918 from jbampton/actions-checkout-name-info
gha: full details for `actions/checkout` name
2023-02-01 14:28:40 +09:00
John Bampton 2bb6eeb7c0 Makefile/Rakefile add target/task for pre-commit install 2023-02-01 13:14:23 +10:00
John Bampton 5532d176e1 gha: full details for actions/checkout name 2023-02-01 02:00:56 +10:00
Yukihiro "Matz" Matsumoto d41ea96c2a string.c: fix boundary check in String#bytesplice
It should be able to append to the receiver.
2023-01-29 17:10:15 +09:00
Yukihiro "Matz" Matsumoto a2e2e83012 string.c: move String#bytesplice to the core 2023-01-28 16:43:40 +09:00
Yukihiro "Matz" Matsumoto 12e232c006 mruby-string-ext/string.rb: add test for String#bytesplice 2023-01-28 16:41:40 +09:00
Yukihiro "Matz" Matsumoto 52746479a3 mruby-string-ext/string.c: new method String#byteslice 2023-01-27 23:22:02 +09:00
Yukihiro "Matz" Matsumoto 7b27346386 mruby-os-memsize/memsize.c: avoid mrb_get_args() 2023-01-26 11:14:10 +09:00
Yukihiro "Matz" Matsumoto 78bbf75981 mruby-random/random.c: avoid mrb_get_args() 2023-01-26 11:13:48 +09:00
Yukihiro "Matz" Matsumoto 4e85e855cf numeric.c: avoid mrb_get_args() if possible 2023-01-25 14:10:43 +09:00
Yukihiro "Matz" Matsumoto 4e5be5a288 array.c: avoid slower mrb_get_args() if possible 2023-01-25 14:10:03 +09:00
Yukihiro "Matz" Matsumoto 37da677cc8 numeric.c (mrb_int_pow): avoid unnecessary calls to mrb_get_args() 2023-01-24 15:25:06 +09:00
Yukihiro "Matz" Matsumoto d1449c2622 array.c (mrb_ary_times): avoid multiple calls to mrb_get_args() 2023-01-24 15:23:30 +09:00
Yukihiro "Matz" Matsumoto d9bf3235d2 mruby-math/math.c: avoid mrb_get_args() if possible
When a method takes single argument, we can use lighter `mrb_get_arg1()`
instead of `mrb_get_args()`.
2023-01-24 09:15:20 +09:00
Yukihiro "Matz" Matsumoto aefc5befbd mruby-io/io.c: fix issues with gets; fix #5913
- gets with RS multiple times
- gets with RS with limit
- gets with limit bigger than buffer size
2023-01-23 07:30:40 +09:00
Yukihiro "Matz" Matsumoto be5266fbe6 mruby-io/test: test gets with RS multiple times; ref #5913 2023-01-23 07:26:40 +09:00
Yukihiro "Matz" Matsumoto 4d5aadfc84 class.c (create_method_value): refactor mrb_method_t creation 2023-01-23 00:17:32 +09:00
Yukihiro "Matz" Matsumoto 079244c36a src/class.c: add new function mrb_vm_find_method
The function skips `cp` dereference, and improve performance of method
calls slightly.
2023-01-23 00:17:32 +09:00
Yukihiro "Matz" Matsumoto 6b0efd43da NEWS: copy entries from doc/mruby3.2.md 2023-01-23 00:17:32 +09:00
Yukihiro "Matz" Matsumoto 2e9f62b12c Merge pull request #5914 from dearblue/doc/mruby3.2.md
Update mruby3.2.md for changes behavior of `mrb_vm_run()`
2023-01-22 22:49:57 +09:00
Yukihiro "Matz" Matsumoto 3c02c517ca Merge pull request #5915 from dearblue/doc/mruby3.2.md.1
Update mruby3.2.md for new `mruby-data` gem
2023-01-22 22:49:05 +09:00
dearblue 998ef1711a Update mruby3.2.md for new mruby-data gem 2023-01-22 20:52:09 +09:00
dearblue a223778ee8 Update mruby3.2.md for changes behavior of mrb_vm_run() 2023-01-22 20:45:57 +09:00
Yukihiro "Matz" Matsumoto 882bb0662a Merge pull request #5912 from dearblue/io-popen
Replaced `NO_IO_POPEN` with `MRB_NO_IO_POPEN`
2023-01-22 13:37:39 +09:00