Commit Graph

16720 Commits

Author SHA1 Message Date
mimaki 2a435caf79 Update version to 3.4.0RC2. 3.4.0-rc2 2025-03-17 16:31:36 +09:00
mimaki 8b65a296db Merge branch 'master' into stable 2025-03-17 15:52:25 +09:00
Yukihiro "Matz" Matsumoto 468c6f1901 doc/mruby3.4.md: add #6491 to the release note 2025-03-17 09:21:36 +09:00
Yukihiro "Matz" Matsumoto d1909320d9 mruby-compiler: fixed a bug in string literal merge; fix #6491 2025-03-17 09:17:38 +09:00
Yukihiro "Matz" Matsumoto a6848ca2cb pre-commit autoupdate 2025-03-15 16:34:18 +09:00
Yukihiro "Matz" Matsumoto eb455c19fe mruby-compiler: prohibit singleton methods for literals
We have checked `def (literal).m` style but not `def literal.m` style.
In addition, `NODE_INT` check is newly added.
2025-03-14 23:28:42 +09:00
Yukihiro "Matz" Matsumoto 8472fe0f13 doc/limitation.md: remove visibility note
We have implemented visibility in mruby 3.4
2025-03-13 22:46:23 +09:00
Yukihiro "Matz" Matsumoto 9c37098c15 Merge pull request #6490 from dearblue/string
Fixed `RSTR_SINGLE_BYTE_P()` return values to boolean
2025-03-13 10:57:49 +09:00
dearblue 609a5c23b2 Fixed RSTR_SINGLE_BYTE_P() return values to boolean
Incorrectly returned void type when `MRB_UTF8_STRING` definition is not present.
2025-03-12 22:01:37 +09:00
Yukihiro "Matz" Matsumoto 17d5aaa048 doc/mruby3.4.md: first draft of the mruby 3.4 release note 2025-03-12 14:51:58 +09:00
Yukihiro "Matz" Matsumoto 5bc00bf199 mruby-compiler: detect super without surrounding method; close #6271 2025-03-11 21:21:50 +09:00
Yukihiro "Matz" Matsumoto 1e6442f54e Revert "class.c (include_module_at): narrow local variable scope"
C++ does not compile `goto` cross local variable declaration.
This reverts commit c618b44fee.
2025-03-10 19:33:49 +09:00
mimaki a2841fd9a8 Update version to 3.4.0RC. 3.4.0-rc 2025-03-10 14:42:59 +09:00
Yukihiro "Matz" Matsumoto 1e36d7662c object.h: rename gccolor to clearer gc_color 2025-03-10 14:23:51 +09:00
Yukihiro "Matz" Matsumoto 92b18d6a44 gc.c: fix re-using to reusing 2025-03-10 14:23:21 +09:00
Yukihiro "Matz" Matsumoto f4de205960 range.c (range_num_to_a): reduce integer to float conversion
For big numbers (especially integers close to MRB_INT_MAX), float
conversion may be lose precisions. So we try not to convert numbers, but
just compare.
2025-03-10 13:13:10 +09:00
Yukihiro "Matz" Matsumoto 76d3739a89 mruby-metaprog (mrb_obj_methods): should not retrieve obj->c directly
In some cases, `obj` may not be an object structure, but an immediate.
2025-03-10 11:40:48 +09:00
Yukihiro "Matz" Matsumoto c618b44fee class.c (include_module_at): narrow local variable scope 2025-03-10 11:26:13 +09:00
Yukihiro "Matz" Matsumoto 48f93adcdc class.c (boot_defclass): unify variable declaration and initialization 2025-03-10 11:25:34 +09:00
Yukihiro "Matz" Matsumoto 32200f1eb9 build_config/no-float.rb: test build for MRB_NO_FLOAT
mruby allows to disable floating point numbers. We have add a build
configuration to test mruby build without floating point numbers.
2025-03-09 17:14:46 +09:00
Yukihiro "Matz" Matsumoto f2c8b43d42 mruby-test: stop unused local variable warning 2025-03-09 16:43:28 +09:00
Yukihiro "Matz" Matsumoto 4ba0cac481 numeric.c (coerce_step_counter): move local variable definition
To avoid unused local variable warning.
2025-03-09 16:42:28 +09:00
Yukihiro "Matz" Matsumoto 2b76967724 Merge pull request #6487 from esotericpig/master
Add Emscripten toolchain & build_config
2025-03-09 14:28:30 +09:00
Yukihiro "Matz" Matsumoto 9a226c28bc hash.c: add arity check for Hash#default_proc (and Hash.new); fix #6484 2025-03-08 16:14:26 +09:00
Yukihiro "Matz" Matsumoto a7f3cfb711 hash.c: allow 'default_proc=nil' to clear default_proc; ref #6483 2025-03-08 15:49:26 +09:00
Yukihiro "Matz" Matsumoto 837f62f18a hash.c: should check type before setting default_proc; fix #6483 2025-03-08 12:34:25 +09:00
Yukihiro "Matz" Matsumoto fbaedfeaad test/hash.rb: remove Hash#freeze before Hash#rehash; ref #6485 2025-03-08 11:25:49 +09:00
Yukihiro "Matz" Matsumoto 87680d3ab2 hash.c (mrb_hash_rehash): call hash_modify before actual modify; fix #6485 2025-03-08 11:21:27 +09:00
Yukihiro "Matz" Matsumoto 213a262b20 hash.c (mrb_hash_compact): call hash_modify instead of mrb_check_frozen
Currently, hash_modify() only calls mrb_check_frozen, but we may add new
checks in the future; ref #6485
2025-03-08 11:15:37 +09:00
Yukihiro "Matz" Matsumoto 96113a2ed9 mruby-io: define File.absolute_path method; ref #6482 2025-03-08 11:12:12 +09:00
Yukihiro "Matz" Matsumoto 436269f62c class.c: remove duplicated CI_TARGET_CLASS definition from class.c 2025-03-08 11:09:57 +09:00
Yukihiro "Matz" Matsumoto 3c4f6501b0 class.c (find_visibility_ci): inline find_ci_from_proc() 2025-03-08 07:54:51 +09:00
esotericpig bfc9742848 Add Emscripten toolchain & build_config 2025-03-07 12:39:54 -10:00
Yukihiro "Matz" Matsumoto 07b986f710 symbol.c (sym_inline_unpack): should not mix signedness 2025-03-07 17:55:20 +09:00
Yukihiro "Matz" Matsumoto ec7477fe0d class.c: take visibility from outer scope
It is possible to update the visibility from within a block, so that
`find_visibility_ci()` should look up outer scopes.
2025-03-07 17:49:08 +09:00
Yukihiro "Matz" Matsumoto 67e85ed296 vm.c (mrb_object_exec): update ci's target class by update function
To avoid breaking a Proc with env set.
2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto fb56fecf51 class.h: remove macros no longer used 2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto 889f09f8b7 class.c: move visibility flags from classes/modules to callinfo 2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto 02bf7fe08e symbol.c (sym_inline_pack): max inline symbol length is now 4 2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto 6e1ab49ed3 class.c: allow changing visibility of methods defined in superclasses 2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 2309fa0353 AUTHORS: update entries [ci skip] 2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 37fb59bdac class.h: rename macros for clarity
- MRB_SET_VISIBILITY -> MRB_CLASS_SET_VISIBILITY
- MRB_VISIBILITY -> MRB_CLASS_VISIBILITY
2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 5e6ea6c5f9 vm.c: restore visibility when reopen class/module definition
Ideally, the default visibility should be stored in the scope. But for
the time being mruby stores the visibility in the class/module. As a
result, nesting class/module reopening or class_eval/module_eval could
cause incompatibility. We will try to fix them in the future.
2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 2a876d2047 class.c: implement top-level public/private/protected in the core in C 2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 43da490a1e class.c: alias should keep the visibility of the original 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 18674c0237 test/module.rb: add visibility tests; ref #1835 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 384579fd21 test/module.rb: rename to pass the spell check 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 921d632615 class.c (mrb_mod_visibility): clear method cache 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 20d5330417 class.c: use MT_VMASK to mask the flag values 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 3f93254b02 mruby-metaprog: add actual test for Kernel#protected_methods 2025-03-07 17:17:47 +09:00