Commit Graph

14385 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto bb67008663 Merge pull request #5832 from FnControlRuby/comparable
Fix `Comparable#clamp` with range
2022-10-27 18:13:40 +09:00
Yukihiro "Matz" Matsumoto 5ee42ff1dd Merge pull request #5833 from jbampton/remove-coding-utf-8-ruby
Remove `# coding: utf-8` from Ruby files
2022-10-27 18:11:54 +09:00
Yukihiro "Matz" Matsumoto 8a67a26104 mruby-pack/pack.c (unpack): check if the given length is positive.
To avoid out-of-bound array access.
2022-10-27 16:32:05 +09:00
John Bampton 44db4f18d3 Remove # coding: utf-8 from Ruby files
The default script encoding is Encoding::UTF-8 after v2.0.

https://ruby-doc.org/core-2.1.2/Encoding.html#class-Encoding-label-Script+encoding
2022-10-27 04:43:13 +10:00
fn ⌃ ⌥ c1697a9c4e kernel.c (mrb_cmp_m): implement Kernel#<=> 2022-10-26 09:04:29 -07:00
fn ⌃ ⌥ 3adae7d237 mruby-compar-ext/compar.rb (clamp): fix range support.
Also, raise error if any comparison among min, max, and self
returns nil.
2022-10-26 09:02:32 -07:00
Yukihiro "Matz" Matsumoto a8a8e7fbd8 Merge pull request #5831 from jbampton/fix-spelling
Fix spelling: `floating point` -> `floating-point`
2022-10-27 00:29:32 +09:00
Yukihiro "Matz" Matsumoto b49eb72a5a Merge pull request #5830 from jbampton/remove-semi-colons-ruby
Remove unneeded trailing semi-colons from Ruby files
2022-10-27 00:28:54 +09:00
John Bampton 8208a836ff Fix spelling: floating point -> floating-point
https://en.wikipedia.org/wiki/Floating-point_arithmetic
2022-10-27 00:09:12 +10:00
John Bampton 7870409cf1 Remove unneeded trailing semi-colons from Ruby files 2022-10-26 23:48:27 +10:00
Yukihiro "Matz" Matsumoto 7eb6d626f5 update pre-commit-config by rake checkupdate; ref #5816 2022-10-26 22:10:38 +09:00
Yukihiro "Matz" Matsumoto eba36f5991 Merge pull request #5827 from jbampton/c-remove-extra-semicolon
Remove unneeded trailing semi-colons from `C` files
2022-10-26 22:10:22 +09:00
Yukihiro "Matz" Matsumoto e678af175e Merge pull request #5829 from jbampton/fiber-c-fix-grammar
fiber.c: fix grammar
2022-10-26 22:09:58 +09:00
Yukihiro "Matz" Matsumoto f18a75e1dc Merge pull request #5828 from jbampton/add-hooks-for-tabs
pre-commit: add hooks `forbid-tabs` and `remove-tabs`
2022-10-26 22:09:21 +09:00
John Bampton da4d7d4bc6 fiber.c: fix grammar
`suspend` -> `suspended`
2022-10-26 22:48:01 +10:00
John Bampton aab7bc0023 pre-commit: add hooks forbid-tabs and remove-tabs
The indentation settings have been taken from the `.editorconfig` file

https://github.com/Lucas-C/pre-commit-hooks
2022-10-26 21:33:32 +10:00
John Bampton 664c9e533b Remove unneeded trailing semi-colons from C files 2022-10-26 20:07:18 +10:00
Yukihiro "Matz" Matsumoto 52a3dc2153 Merge pull request #5825 from jbampton/add-pre-commit-hook
pre-commit: add hook `check-shebang-scripts-are-executable`
2022-10-26 18:55:18 +09:00
Yukihiro "Matz" Matsumoto ce9918d45c Merge pull request #5824 from jbampton/tasks-rake-doc-macos
tasks: enable rake docs to open on macOS
2022-10-26 18:53:32 +09:00
Yukihiro "Matz" Matsumoto 1aa77c9f23 Merge pull request #5826 from jbampton/replace-gsub-with-tr
Replace `gsub` with `tr`
2022-10-26 18:04:32 +09:00
Yukihiro "Matz" Matsumoto 580134e07a Merge pull request #5823 from jbampton/remove-travis-button
docs: remove unused Travis CI button from README
2022-10-26 18:03:26 +09:00
Yukihiro "Matz" Matsumoto f718408371 Merge pull request #5822 from jbampton/assert-remove-comma
Remove unneeded trailing comma from `assert_equal` statement
2022-10-26 17:42:36 +09:00
John Bampton 1626758ccc Replace gsub with tr
Using `tr` is faster than `gsub` when replacing a single character in a string with another single character
2022-10-26 18:17:17 +10:00
John Bampton 1d37f75add pre-commit: add hook check-shebang-scripts-are-executable
chmod +x ./mrbgems/mruby-bin-config/mruby-config

https://github.com/pre-commit/pre-commit-hooks#check-shebang-scripts-are-executable
2022-10-26 16:37:17 +10:00
John Bampton 1bf9ed196c tasks: enable rake docs to open on macOS
The `xdg-open` command is not available on macOS.

macOS uses the `open` command.

Add info to install doxygen on macOS with Homebrew.

https://formulae.brew.sh/formula/doxygen
2022-10-26 15:39:10 +10:00
John Bampton 2e3861ff7c docs: remove unused Travis CI button from README
The building on travis-ci.org is ceased.
2022-10-26 14:40:20 +10:00
Yukihiro "Matz" Matsumoto 20617017df Merge pull request #5821 from jbampton/standardize-md-lists
docs: standardize Markdown lists
2022-10-26 13:12:56 +09:00
John Bampton b049a71582 Remove unneeded trailing comma from assert_equal statement 2022-10-26 13:58:53 +10:00
John Bampton 696226a60e docs: standardize Markdown lists
Previously for lists we were using both `*` and `-` to start the list items.

This pr changes all lists to use `-`.
2022-10-26 13:09:41 +10:00
Yukihiro "Matz" Matsumoto 0ae85c9233 Merge pull request #5816 from jbampton/add-target
Makefile/Rakefile: add checkupdate target
2022-10-26 11:20:25 +09:00
John Bampton 72f22afc99 Makefile/Rakefile: add checkupdate target
Runs `pre-commit autoupdate`
2022-10-26 12:04:59 +10:00
Yukihiro "Matz" Matsumoto a1cdb3240e Merge pull request #5820 from FnControlRuby/nil
Implement `nil.to_c` and `nil.to_r`
2022-10-26 07:32:19 +09:00
Yukihiro "Matz" Matsumoto fe5191398a mruby-set: rename mrb_set.rb to set.rb. 2022-10-25 16:59:49 +09:00
Yukihiro "Matz" Matsumoto e3f74074ba mruby-set: remove intialize_{dup,clone}. 2022-10-25 16:58:31 +09:00
Yukihiro "Matz" Matsumoto 1152c43039 mruby-set: remove taint/untaint which are no longer exist. 2022-10-25 16:57:24 +09:00
fn ⌃ ⌥ c65200cb5a complex.rb: implement Numeric#to_c 2022-10-24 17:31:52 -07:00
fn ⌃ ⌥ 7801741790 complex.c: implement nil.to_c 2022-10-24 17:31:52 -07:00
fn ⌃ ⌥ f3ec5f744f rational.c: implement nil.to_r and Float#to_r 2022-10-24 17:31:52 -07:00
Yukihiro "Matz" Matsumoto 7cf3b57cba mruby-set/mrb_set.rb (<=>): update definition.
Set#<=> needs to be comparing sets to be subset/superset relation.
2022-10-24 07:53:52 +09:00
Yukihiro "Matz" Matsumoto 7acf756b6f mruby-set/mrb_set.rb: add __ prefix to internal methods. 2022-10-24 07:44:21 +09:00
Yukihiro "Matz" Matsumoto ca0db4a161 mruby-set/README.md: more cleanup after #5814 2022-10-24 07:42:53 +09:00
Yukihiro "Matz" Matsumoto b1fd3dc160 mruby-set/mrbgem.rake; remove test dependency to mruby-metaprog.
mruby-set no longer depends on mruby-metaprog by introducing the
internal `_hash` method.
2022-10-24 07:42:52 +09:00
Yukihiro "Matz" Matsumoto e9ee0f2953 mruby-set/set.rb (_hash): add utility function to access internal hash.
Since `instance_variable_get` is no longer in the core.
2022-10-24 07:42:52 +09:00
Yukihiro "Matz" Matsumoto d5e13a7f2a mruby-set/set.rb (do_with_enum): prefix _ to internal method. 2022-10-24 07:41:30 +09:00
Yukihiro "Matz" Matsumoto 59162ceb4e Merge pull request #5817 from FnControlRuby/set
mrb_set.rb: improve ruby/spec compliance.
2022-10-24 07:41:20 +09:00
fn ⌃ ⌥ b0a494c414 mrb_set.rb: improve ruby/spec compliance.
- Alias `#===` to `#include?`
- Alias `#filter!` to `#select!`
- Fix `#subset?` and `#proper_subset?` for Set-like objects.
- Fix `#==`
- Fix `#inspect` for self-referencing sets.
- Add `#<=>` and `#join`
2022-10-23 07:42:25 -07:00
Yukihiro "Matz" Matsumoto f5824029ad Merge pull request #5814 from jbampton/mruby-set-docs
Clean up the mruby-set README
2022-10-22 22:57:22 +09:00
John Bampton f78fdecfc8 Clean up the mruby-set README 2022-10-22 12:25:29 +10:00
Yukihiro "Matz" Matsumoto 2d57967afa Merge pull request #5813 from jbampton/fix-pre-commit
gha: fix pre-commit
2022-10-22 07:50:03 +09:00
John Bampton 2ebb001e76 gha: fix pre-commit
Run `pre-commit run --all-files`
2022-10-22 08:31:38 +10:00