dearblue
3fd5e1c250
Fixed visibility at method definition
...
There was a problem with visibility state from proc that straddles a fiber or is independent.
Therefore, it has been changed to give priority to env objects, if any.
Also, added "separate module" flag to block traversal to a higher level env object.
Note that the "separate module" flag is now set when calling blocks with the `mrb_yield_with_class()` function.
fixed https://github.com/mruby/mruby/issues/6494
2025-04-11 21:36:26 +09:00
Yukihiro "Matz" Matsumoto
1fdd961041
mruby-compiler (scope_new): need to initialize nregs; fix #6509
...
`nregs` should not be smaller than `nlocals`.
2025-04-07 11:35:19 +09:00
Yukihiro "Matz" Matsumoto
8c2ea232ea
Revert "mruby-enum-ext (cycle): need to splat block parameters; #6508 "
...
This reverts commit 6c4b799b42 .
2025-04-07 08:23:52 +09:00
Yukihiro "Matz" Matsumoto
6c4b799b42
mruby-enum-ext (cycle): need to splat block parameters; #6508
2025-04-06 22:05:57 +09:00
Yukihiro "Matz" Matsumoto
96855d31b5
mruby-enum-ext (sum): need to honor index; fix #6508
2025-04-06 22:04:56 +09:00
Yukihiro "Matz" Matsumoto
dd68681002
mruby-enum-ext: tally should respect multi-values; fix #6507
2025-04-05 22:12:51 +09:00
Yukihiro "Matz" Matsumoto
cb8cd9388c
mruby-enum-ext: filter_map should not ignore index; fix #6504
2025-04-05 21:44:49 +09:00
Yukihiro "Matz" Matsumoto
9750513c25
mruby-bigint (mpz_get_str): add type cast to stop warning
2025-04-04 23:55:44 +09:00
Yukihiro "Matz" Matsumoto
bf36ba9d10
Merge pull request #6505 from jbampton/fix-spelling
...
mrbgems: fix spelling
2025-04-04 17:33:32 +09:00
John Bampton
b1d910f6f4
mrbgems: fix spelling
2025-04-04 15:05:13 +10:00
Yukihiro "Matz" Matsumoto
07d7aa6fdb
mruby-pack: fix int and mrb_int mixture
2025-04-02 16:45:11 +09:00
Yukihiro "Matz" Matsumoto
b88680ee9e
mruby-pack (pack_unpack): use mrb_bool instead of int
2025-04-02 16:44:06 +09:00
Yukihiro "Matz" Matsumoto
5c2c77c71c
mruby-string (str_succ_bang): fixed sample string; close #6500
...
To avoid spellcheck failure in pre-commit.
2025-04-01 11:00:25 +09:00
Yukihiro "Matz" Matsumoto
d908daa8b9
mruby-rational (rational_hash): hash value is uint32_t
2025-03-25 08:10:49 +09:00
Yukihiro "Matz" Matsumoto
b446b0d547
mruby-compiler: add type cast to silence warning
2025-03-25 08:10:04 +09:00
Yukihiro "Matz" Matsumoto
4ca61298ac
mruby-sprintf: add type cast to silence warning
2025-03-25 08:08:26 +09:00
Yukihiro "Matz" Matsumoto
7e18b1dadb
mruby-fiber/fibertest.c: use ptrdiff_t for pointer difference
2025-03-24 22:31:27 +09:00
Yukihiro "Matz" Matsumoto
b8351d6191
mruby-io/file.c: use ptrdiff_t for pointer difference
2025-03-24 22:30:53 +09:00
Yukihiro "Matz" Matsumoto
dd2950211c
mruby-io/mruby_io_test.c: use -1 for length (means strlen(s))
2025-03-24 15:19:54 +09:00
Yukihiro "Matz" Matsumoto
4aae7be949
mruby-io (path_gethome): move local variable declarations
2025-03-24 14:03:13 +09:00
Yukihiro "Matz" Matsumoto
a33426da15
mruby-io (mrb_file_s_chmod): check string type before casting
2025-03-23 20:04:25 +09:00
Yukihiro "Matz" Matsumoto
11f6251d23
mruby-io (mrb_file_basename): fixed a silly mistake
2025-03-22 13:01:38 +09:00
Yukihiro "Matz" Matsumoto
aa06aff50d
mruby-io/file.c: use mrb_sys_fail instead of mrb_raise (w/ errno info)
2025-03-22 11:02:05 +09:00
Yukihiro "Matz" Matsumoto
f3b79fcc23
mruby-io (mrb_file_s_readlink): increase buffer size linearly
2025-03-21 19:34:05 +09:00
Yukihiro "Matz" Matsumoto
ca693dec30
mruby-io (mrb_file_s_readlink): when rc == bufsize, rc never be -1
2025-03-21 19:31:12 +09:00
Yukihiro "Matz" Matsumoto
9e315af2a5
mruby-io (mrb_file_basename): fixed wrong strncmp usage
2025-03-21 10:37:05 +09:00
Yukihiro "Matz" Matsumoto
90d4805f5b
mruby-io (mrb_file_realpath): use mrb_str_cat instead of mrb_str_append
2025-03-20 22:04:49 +09:00
Yukihiro "Matz" Matsumoto
5bc391e170
mruby-io (mrb_file_basename): use mrb_str_cat() instead of snprintf(3)
2025-03-20 22:03:30 +09:00
Yukihiro "Matz" Matsumoto
dbafada7be
mruby-io (mrb_file_basename): use "z" specifier for mrb_get_args()
2025-03-20 13:39:38 +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
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
5bc00bf199
mruby-compiler: detect super without surrounding method; close #6271
2025-03-11 21:21:50 +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
f2c8b43d42
mruby-test: stop unused local variable warning
2025-03-09 16:43: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
96113a2ed9
mruby-io: define File.absolute_path method; ref #6482
2025-03-08 11:12:12 +09:00
esotericpig
bfc9742848
Add Emscripten toolchain & build_config
2025-03-07 12:39:54 -10: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
3f93254b02
mruby-metaprog: add actual test for Kernel#protected_methods
2025-03-07 17:17:47 +09:00
Yukihiro "Matz" Matsumoto
16db15d6fd
mruby-metaprog: add actual test for Kernel#private_methods
2025-03-07 17:17:47 +09:00
Yukihiro "Matz" Matsumoto
2db1ad9ce3
mruby-metaprog/test: avoid potential name crash by Foo class
2025-03-07 17:17:47 +09:00
Yukihiro "Matz" Matsumoto
52403abcf8
mruby-binding: make Kernel#binding private
2025-03-07 17:17:45 +09:00
Yukihiro "Matz" Matsumoto
e5e8dd11c0
mruby-rational: make Rational() private
2025-03-07 17:17:45 +09:00
Yukihiro "Matz" Matsumoto
2a991fb399
mruby-complex: make Complex() private
2025-03-07 17:17:45 +09:00
Yukihiro "Matz" Matsumoto
111fe4b3be
mruby-compiler: generate OP_SSEND from Complex and Rational literals
2025-03-07 17:17:45 +09:00
Yukihiro "Matz" Matsumoto
4a0e80601f
mruby-kernel-ext: make Kernel methods private
...
- fail
- caller
= __method__
- __callee__
- Integer
= Float
- String
- Array
- Hash
2025-03-07 17:17:45 +09:00
Yukihiro "Matz" Matsumoto
93e133548f
mruby-eval: make #eval private
2025-03-07 17:17:44 +09:00
Yukihiro "Matz" Matsumoto
d7a4275dd1
mruby-metaprog: make #global_variables, #local_variables private
2025-03-07 17:17:44 +09:00
Yukihiro "Matz" Matsumoto
3a56106d6c
mruby-proc-ext: make #proc private
2025-03-07 17:17:43 +09:00
Yukihiro "Matz" Matsumoto
cc54865873
mruby-sleep: make #sleep (and #usleep) private
2025-03-07 17:17:43 +09:00