| Age | Commit message (Collapse) | Author |
|
|
|
|
|
#### Before this patch:
```
$ bin/mruby --verbose -e 'p 1'
bin/mruby: Cannot open program file: --verbose
```
#### After this patch:
```
$ bin/mruby --verbose -e 'p 1'
00001 NODE_SCOPE:
(snip)
irep 0x7fe97041df30 nregs=4 nlocals=1 pools=0 syms=1 reps=0 iseq=11
file: -e
1 000 OP_LOADSELF R1
(snip)
1
```
|
|
#### Before this patch:
```
$ bin/mruby -e 'p ARGV' -- -x
bin/mruby: invalid option -- (-h will show valid options)
```
#### After this patch:
```
$ bin/mruby -e 'p ARGV' -- -x
["-x"]
```
|
|
#### Before this patch:
```
$ bin/mruby -e 'p ARGV' a b
["bin/mruby", "-e", "p ARGV", "a", "b"]
```
#### After this patch:
```
$ bin/mruby -e 'p ARGV' a b
["a", "b"]
```
|
|
#### Before this patch:
```
$ bin/mruby -ce 1
bin/mruby: Cannot open program file: 1
```
#### After this patch:
```
$ bin/mruby -ce 1
Syntax OK
```
|
|
- I think "Info" is used only to `skip`, so change to "Skip".
- Changed the default value of `assert` and specify the argument explicitly
at the caller of `assert` because it is unnatural "Assertion failed" is
output even though the assertion doesn't fail.
== Example:
def assert_foo(exp, act)
assert do
assert_equal exp[0], act[0]
assert_equal exp[1], act[1]
end
end
def assert_bar(exp, act)
assert do
skip
end
end
def assert_baz(exp, act)
assert do
assert_equal exp, act
assert_bar exp, act
end
end
assert 'test#skip_in_nested_assert' do
assert_baz 1, 1
end
=== Before this patch:
?..
Info: test#skip_in_nested_assert (core)
- Assertion[1]
Info: Assertion failed (core)
- Assertion[1-2]
Skip: Assertion failed (core)
Total: 3
OK: 2
KO: 0
Crash: 0
Warning: 0
Skip: 1
=== After this patch:
???
Skip: test#skip_in_nested_assert (core)
- Assertion[1]
Skip: assert (core)
- Assertion[1-2]
Skip: assert (core)
Total: 3
OK: 0
KO: 0
Crash: 0
Warning: 0
Skip: 3
|
|
|
|
|
|
- Modify some error messages for consistency.
- Add test for codegen error.
- Use regular expression for error message matching in test.
|
|
- Write message to stderr instead of stdout.
- Avoid duplicate message output (`SyntaxError`, `ScriptError` etc).
- Refine invalid option message.
- Suppress redundant usage output.
- Fix some incorrect exit code.
|
|
|
|
Example:
# example.rb
p(2e308)
p(-2e308)
Good:
$ bin/mruby example.rb
inf
-inf
Bad:
$ bin/mrbc example.rb
$ bin/mruby -b example.mrb
0
-0
Cause:
Float infinity representation is `inf` on dump and it is converted by
corresponding `String#to_f` on load.
Treatment:
- Introduce new representations (`i`: +infinity, `I`: -infinity)
- Allow old representations (`inf`, `-inf`, `infinity`, `-infinity`) too
- Raise error for unknown representations (use corresponding `Kernel#Float`)
|
|
|
|
|
|
|
|
|
|
|
|
Reported by https://hackerone.com/haquaman
|
|
'bin/mruby' not work on windows. so correct command name and quoted arguments.
|
|
|
|
|
|
|
|
|
|
|