Commit Graph

16788 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 9cc6d39956 test/module.rb: add test for #6506 2025-04-14 22:09:35 +09:00
Yukihiro "Matz" Matsumoto 1969100fb4 variable.c (mrb_vm_get_const): seek singleton class superclass; fix #6506
Also ensure we don't revive #2515, #3003, #3598
2025-04-14 22:09:35 +09:00
Yukihiro "Matz" Matsumoto 953ebdf334 variable.c (mrb_vm_const_get): refactoring for singleton classes 2025-04-14 22:09:35 +09:00
Yukihiro "Matz" Matsumoto 95f9de4877 mruby-metaprog (mrb_mod_s_constants): Module.constants implemented
The method returns the list of all constants accessible from the point
of call.
2025-04-14 22:09:35 +09:00
Yukihiro "Matz" Matsumoto e08452585e variable.c (mrb_mod_cv_get): c must not be NULL as an argument 2025-04-14 22:09:34 +09:00
Yukihiro "Matz" Matsumoto 90d77e71f5 variable.c (mrb_mod_cv_set): small refactoring
The argument c should not be NULL.
2025-04-14 22:09:34 +09:00
Yukihiro "Matz" Matsumoto 118e13d85c variable.c: a new function mrb_mod_const_at()
And mrb_mod_constants() use the new function now.
2025-04-14 22:09:34 +09:00
Yukihiro "Matz" Matsumoto cda551ce25 mruby-metaprog (mrb_mod_s_constants): call Module#constants if possible
When the optional argument is given or the receiver is not `Module`.
2025-04-14 22:09:34 +09:00
Yukihiro "Matz" Matsumoto 82522a2e71 mruby-bigint (mrb_bint_to_s): add check for MRB_32BIT and MRB_INT64 2025-04-14 22:09:33 +09:00
Yukihiro "Matz" Matsumoto 29964b3ba7 mruby-io (mrb_file_size): add check for MRB_32BIT and MRB_INT64 2025-04-14 22:09:33 +09:00
Yukihiro "Matz" Matsumoto 0d5fecf833 variable.c (mrb_const_get): adjust local variable scope 2025-04-14 22:09:33 +09:00
Yukihiro "Matz" Matsumoto 52de3b7e10 Merge pull request #6511 from dearblue/precommit
Exclude the external project "lrama" from pre-commit
2025-04-08 23:44:31 +09:00
dearblue 40095bf755 Exclude the external project "lrama" from pre-commit 2025-04-08 22:11:32 +09:00
Yukihiro "Matz" Matsumoto 46aa35a117 Merge pull request #6510 from dearblue/visibility
Fixed class method visibility via `module_function`
2025-04-08 17:18:19 +09:00
dearblue 84e1b0045c Fixed class method visibility via module_function
The following code should work

```ruby
module M
  def me
    p self
  end

  module_function :me
end

M.me
```
2025-04-07 21:40:56 +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 76f7678db2 AUTHORS: update entries [ci skip] 2025-04-04 07:56:52 +09: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 3684a27209 tools/lrama: update to lrama 0.7.0; close #6384 2025-04-02 00:16:23 +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 4af6fe87c4 doc/mruby3.4.md: remove wrong spelling from the pull-request description 2025-03-31 21:42:01 +09:00
Yukihiro "Matz" Matsumoto 9405702e02 Merge pull request #6503 from jbampton/misc-typo-fixes
misc: fix typos
2025-03-31 16:16:55 +09:00
Yukihiro "Matz" Matsumoto 206eccb828 boxing_word.h: allow 4 byte alignment of object pointers
Only if MRB_WORDBOX_NO_FLOAT_TRUNCATE or MRB_NO_FLOAT is defined.
2025-03-30 23:23:02 +09:00
John Bampton b56f984c25 misc: fix typos 2025-03-30 14:04:34 +10:00
Yukihiro "Matz" Matsumoto 39fbc96eaf Merge pull request #6502 from jbampton/patch-2
pre-commit: update prettier to the latest version
2025-03-29 19:02:42 +09:00
John Bampton 14f2e6db5a pre-commit: update prettier to the latest version
https://www.npmjs.com/package/prettier
2025-03-29 16:31:58 +10:00
Yukihiro "Matz" Matsumoto a317b744f4 Merge pull request #6501 from jbampton/patch-2
Update pre-commit Node.js version to `v22.14.0 LTS`
2025-03-29 14:09:15 +09:00
John Bampton 14de644234 Update pre-commit Node.js version to v22.14.0 LTS 2025-03-29 07:32:47 +10:00
Yukihiro "Matz" Matsumoto 6a3e5b87f8 Merge pull request #6497 from jbampton/patch-2
gha: update `build.yml` try `windows-2025` image
2025-03-28 12:40:40 +09:00
Yukihiro "Matz" Matsumoto a9353c4f73 Merge pull request #6498 from jbampton/pre-commit-clean-up
Clean up and standardize the pre-commit config
2025-03-28 09:02:57 +09:00
Yukihiro "Matz" Matsumoto 2ce0606f14 guides/symbol.md: 'punctuation' is uncountable; close #6488
Issue #6488 is addressed by fixing spelling.
2025-03-28 08:22:53 +09:00
John Bampton c1a0a6193b pre-commit autoupdate 2025-03-28 08:04:21 +10:00
John Bampton 1ae4f94844 Clean up and standardize the pre-commit config 2025-03-28 07:39:59 +10:00
Yukihiro "Matz" Matsumoto 7538ee8f5d gperf: remove obsolete command line options -p and -g 2025-03-28 06:16:00 +09:00
John Bampton 68a0ecc782 gha: update build.yml try windows-2025 image
https://github.com/actions/runner-images?tab=readme-ov-file#available-images

https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md
2025-03-28 04:24:32 +10:00
Yukihiro "Matz" Matsumoto 0090e2cd01 github/workflows/coverage.yml: measure coverage on push only 2025-03-26 16:22:37 +09:00
Yukihiro "Matz" Matsumoto 7351f1127b vm.c: ci_bidx() returns mrb_int, that may be different in size from int 2025-03-26 16:19:26 +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 a574034cb2 hash.c (hash_set_default_proc): mrb_proc_arity() returns mrb_int 2025-03-25 08:09:21 +09:00
Yukihiro "Matz" Matsumoto 4ca61298ac mruby-sprintf: add type cast to silence warning 2025-03-25 08:08:26 +09:00