Since presym is now mandatory, mruby.h includes presym.h so that
MRB_SYM() macros are available everywhere without explicit include.
Remove redundant #include <mruby/presym.h> from all source files.
Co-authored-by: Claude <noreply@anthropic.com>
mruby-sleep: declare slp_tm before #ifdef _WIN32 block to fix
undeclared variable error in non-Windows branch.
hal-posix-socket: use #if defined(HAVE_SA_LEN) && HAVE_SA_LEN instead
of #ifdef HAVE_SA_LEN, since mruby-socket defines HAVE_SA_LEN to 0 on
non-BSD platforms.
Co-authored-by: Claude <noreply@anthropic.com>
change sleep, usleep, sleep_ms from private methods to module functions
to match cruby behavior where sleep can be called as both bare sleep and
kernel.sleep.
Co-authored-by: Claude <noreply@anthropic.com>
Added complete call-seq documentation for thread suspension methods in
src/sleep.c:
## Core Methods:
### sleep:
- Suspends current thread for specified duration in seconds
- Supports floating point precision when MRB_NO_FLOAT is not defined
- Returns actual number of seconds slept (rounded)
- Cross-platform implementation (Windows Sleep vs Unix nanosleep)
- Comprehensive examples showing fractional second delays
### usleep:
- Suspends current thread for specified duration in microseconds
- Provides microsecond-level precision for short delays
- Integer-only parameter for precise timing control
- Returns 0 on successful completion
- Examples demonstrating millisecond and microsecond delays
Co-authored-by: Atlassian Rovo Dev
The GitHub Super Linter is a more robust and better supported
tool than the current GitHub Actions we are using.
Running these checks:
ERROR_ON_MISSING_EXEC_BIT: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_EDITORCONFIG: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true
https://github.com/marketplace/actions/super-linterhttps://github.com/github/super-linter
Added the GitHub Super Linter badge to the README.
Also updated the pre-commit framework and added
more documentation on pre-commit.
Added one more pre-commit check: check-executables-have-shebangs
Added one extra check for merge conflicts to our
GitHub Actions.
EditorConfig and Markdown linting.
Minor grammar and spelling fixes.
Update linter.yml
Run on pull request only
Using https://www.npmjs.com/package/markdownlint-cli
Lint Markdown for rules:
- MD009/no-trailing-spaces
- MD012/no-multiple-blanks
- MD022/blanks-around-headings
- MD031/blanks-around-fences
- MD032/blanks-around-lists
In addition, update the documents referring `build_config.rb` which is
no longer used. The new `build_config.rb` describes the new configuration
structure in the comment.
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT`
- `MRB_USE_FLOAT` => `MRB_USE_FLOAT32`
The former is to use `USE_XXX` naming convention. The latter is to make
sure `float` is 32bit float and not floating point number in general.
* Method implementation functions made `static`.
* Function declaration style has been changed.
* Unnecessary header file `mrb_sleep.h` removed.
* Used `mrb_get_args()` instead of self parsing.
* Indentation kept untouched.