| Age | Commit message (Collapse) | Author |
|
Fixed finding variables from `proc` in `binding.eval` failed
|
|
Fixed finding variables defined in the upper proc failed
|
|
Previously the following code did not produce the expected results:
```ruby
bx = binding
block = bx.eval("a = 1; proc { a }")
bx.eval("a = 2")
p block.call # Expect 2 but return 1 due to a bug
```
The previous implementation of `Binding#eval` evaluated the code and then merged the top layer variables.
This patch will parse and expand the variable space before making a call to `eval`.
This means that the call to `Binding#eval` will do the parsing twice.
In addition, the following changes will be made:
- Make `mrb_parser_foreach_top_variable()`, `mrb_binding_extract_proc()` and `mrb_binding_extract_env()` functions private global functions.
- Remove the `posthook` argument from `mrb_exec_irep()`.
The `posthook` argument was introduced to implement the `binding` method.
This patch is unnecessary because it uses a different implementation method.
ref #5362
fixed #5491
|
|
Fix memory leak in `Kernel#eval`
|
|
If no new variable was defined in the `eval` method, the variable was hidden from the nested `eval` method.
```ruby
a = 1
p eval %(b = 2; eval %(a)) # => 1 (good)
p eval %(eval %(a)) # => undefined method 'a' (NoMethodError)
```
This issue has occurred since mruby 3.0.0.
|
|
The `mrbc_context` remained unreleased when the `mrb_parse_nstring()` function returned `NULL`.
|
|
|
|
- `Module#method_added`
- `BasicObject#singleton_method_added`
|
|
|
|
Add official pre-commit file-contents-sorter
|
|
Remove unneeded bash script sort-codespell-wordlist.sh
https://github.com/pre-commit/pre-commit-hooks#file-contents-sorter
|
|
* android_arm64-v8a.rb -> android_arm64_v8a.rb
* no-float.rb -> host-nofloat.rb
|
|
Enable markdownlint rules MD003,MD005,MD007
|
|
pre-commit autoupdate
|
|
https://pre-commit.com/#pre-commit-autoupdate
|
|
Lint Markdown
https://github.com/DavidAnson/markdownlint#rules--aliases
|
|
- `truncate`
- `floor`
- `ceil`
`round` already takes `ndigits`.
|
|
Added `MRB_OBJ_ALLOC()` macro that does not require a cast
|
|
|
|
The `MRB_OBJ_ALLOC()` macro function returns a pointer of the type corresponding to the constant literal defined in `enum mrb_vtype`.
|
|
|
|
|
|
- ` mrb_block_given_p()` -- The name comes from CRuby's `rb_block_given_p ()`
At the same time, it applies to `f_instance_eval()` and `f_class_eval()` of `mruby-eval`.
|
|
Enable markdownlint rule MD046 code-block-style
|
|
Fix C Markdown code block style
|
|
Add the rules to the markdownlint config file as comments
|
|
mruby/dependabot/github_actions/actions/upload-artifact-2.2.4
build(deps): bump actions/upload-artifact from 2.2.3 to 2.2.4
|
|
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.3...v2.2.4)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
|
|
`mrb_vm_const_get` function looks up the constant first in the base
class, so that fallback `const_get` need not to search from the base.
|
|
|
|
```ruby
module M
FOO = 'm'
end
class A
FOO = 'a'
prepend M
end
class B < A
def foo
p FOO
end
end
B.new.foo # should print `m` not `a`
```
|
|
|
|
Add two more pre-commit hooks
|
|
Standardize commands inside backticks
|
|
Remove whitespace
|
|
Fix shebang by removing whitespace
|
|
|
|
|
|
Enable MD011 no-reversed-links - Reversed link syntax
|
|
This reverts commit ee3017496ba60ca418b5e54c1f8f5d8b38524a52.
I misunderstood something and the new behavior was different from CRuby.
The issue was reported by @dearblue, regarding #5478
|
|
Add documentation on spell checking with misspell
|
|
Run pre-commit with GitHub Actions
|
|
|
|
Running pre-commit with GitHub Actions now gives us more tests and coverage
Remove duplicate GitHub Actions for merge conflicts and trailing whitespace
Remove duplicate checks for markdownlint and yamllint from the GitHub Super-Linter
Add new custom pre-commit hook running with a shell script to sort alphabetically and uniquify codespell.txt
Add new pre-commit hook to check spelling with codespell
https://github.com/codespell-project/codespell
Fix spelling
|
|
`mrb_float_to_str()` used to take `fmt` argument. We thought no one used
the function, and OK to remove the argument. But at least `mruby-redis`
gem used the function.
|
|
|
|
|
|
|
|
|
|
|