Yukihiro "Matz" Matsumoto
7b968ca893
Clear parsing_heredoc at the end of file
2016-12-10 12:35:12 +09:00
Bouke van der Bijl
1264219832
Fix segfault in gen_values with NOVAL and more than 127 args
2016-12-09 10:30:05 -05:00
Bouke van der Bijl
c8da3c4df4
Fix segfault when undef is called with exactly 127 arguments
...
The issue is that when there are more than 126 arguments an array needs
to be created to pass the arguments on with.
Reported by https://hackerone.com/revskills
2016-12-08 15:47:17 -05:00
Tomasz Dąbrowski
0360a744b5
Promote load_exec to mruby API as mrb_load_exec ( fixes #3248 )
2016-12-07 21:21:21 +01:00
Yukihiro "Matz" Matsumoto
43512cc7bd
Reorganize heredoc rules; fix #3273
...
The following codes used to be SyntaxError:
(1)
a = <<-EOD;
hello
EOD
(2)
<<-EOD.bla begin
k
EOD
end
2016-12-05 02:55:39 +09:00
Yukihiro "Matz" Matsumoto
a0fbc46ccd
Import locale insensitive strtod() from Ruby1.8; fix #3270
...
The function was renamed to `mrb_float_read(const char*, char**)`.
2016-12-03 18:47:04 +09:00
Yukihiro "Matz" Matsumoto
f6d199919d
Needed to apply block from safe-navigation operators; fix #3310
2016-12-03 16:38:43 +09:00
Yukihiro "Matz" Matsumoto
6b84ff4a44
Print NODE_SCALL (&.) from mrb_parser_dump()
2016-12-03 16:21:15 +09:00
Yukihiro "Matz" Matsumoto
c029c6c444
codegen: avoid unnecessary OP_MOVE after CASE
2016-12-03 14:50:36 +09:00
Bouke van der Bijl
fe362c1f26
Fix segfault when using result of rest assignment
...
Reported by https://hackerone.com/haquaman
2016-12-01 15:49:36 -05:00
Yukihiro "Matz" Matsumoto
2cca9d3688
avoid comparison between signed and unsigned integer; ref #3312
2016-12-01 18:49:39 +09:00
Nobuyoshi Nakada
0f08914ac0
Support multiple elements \u syntax
2016-12-01 16:48:43 +09:00
Nobuyoshi Nakada
fed40b44b8
Extract read_escape_unicode from read_escape
2016-12-01 16:48:43 +09:00
Yukihiro "Matz" Matsumoto
8461a31cb4
Fixed too much void_expr_error(); fix #3307
2016-11-30 13:04:50 +09:00
Bouke van der Bijl
523c267020
Interpret argument in 'f ()' as nil instead of nothing
2016-11-29 09:23:53 -05:00
Yukihiro "Matz" Matsumoto
27ceb84818
parse.y: use opt_paren_args to simplify yield rule
2016-11-27 22:43:46 +09:00
Yukihiro "Matz" Matsumoto
55842c5a34
resolve conflict; ref #3279
2016-11-25 09:33:20 +09:00
Yukihiro "Matz" Matsumoto
30f12ba4bc
resolve conflict; ref #3283
2016-11-25 09:27:24 +09:00
Yukihiro "Matz" Matsumoto
cc2786c84e
resolve conflict; ref #3285
2016-11-25 09:25:51 +09:00
Yukihiro "Matz" Matsumoto
0b4017fd69
resolve conflict; ref #3286
2016-11-25 09:23:47 +09:00
Francis Bogsanyi
964427f82c
Fix unsafe peephole optimization
...
Reported by https://hackerone.com/dkasak
2016-11-24 10:32:34 -05:00
Bouke van der Bijl
71641bbf73
Fix segfault caused by empty condition in ternary
...
Reported by https://hackerone.com/jpenalbae
2016-11-24 10:20:42 -05:00
Bouke van der Bijl
1253982577
Fix codegen issue causing misaligned register
...
Reported by https://hackerone.com/haquaman
2016-11-24 10:18:48 -05:00
Bouke van der Bijl
75b31d7438
Fix segfault on method call with exactly 127 arguments
...
Reported by https://hackerone.com/dkasak
2016-11-24 10:09:37 -05:00
Bouke van der Bijl
73e4f069be
Fix nested empty heredoc causing segfault
...
As reported by https://hackerone.com/jpenalbae
2016-11-24 09:54:18 -05:00
Yukihiro "Matz" Matsumoto
22f73250db
redo should work well in for statement; fix #3275
2016-11-24 21:25:27 +09:00
Yukihiro "Matz" Matsumoto
227daa8811
Relax 'void value expression' check that was too strict
2016-11-24 11:22:54 +09:00
Yukihiro "Matz" Matsumoto
1c9593954b
Add "void value expression" check to the parser.
2016-11-24 10:32:28 +09:00
Yukihiro "Matz" Matsumoto
dc4be19aab
Add forgotten loop_pop() in NODE_OP_ASGN codegen
2016-11-24 10:01:03 +09:00
Yukihiro "Matz" Matsumoto
669bbc70b0
codegen_scope should not keep old iseq ptr from irep
2016-11-23 21:08:35 +09:00
Yukihiro "Matz" Matsumoto
752ca514f6
do not dump_node if parser failed
2016-11-11 22:51:48 +09:00
Yukihiro "Matz" Matsumoto
185dad3a6e
node_dump() to print NODE_HEREDOC terminator
2016-11-11 22:50:41 +09:00
Yukihiro "Matz" Matsumoto
45aadd7e60
HEREDOC could fail with NUL terminated lines; fix#3244
2016-11-11 22:49:23 +09:00
Yukihiro "Matz" Matsumoto
3f002b6993
fixed a bug when number of LHS and RHS differs; fix #3239
2016-11-11 04:37:42 +09:00
Yukihiro "Matz" Matsumoto
1142cf2037
fixed a bug with [] in RHS of multiple assignments; fix #3236
2016-11-08 22:18:41 +09:00
Yukihiro "Matz" Matsumoto
cc3f1b7f5c
allow single quoted labels in hashes; ref #3231
2016-11-02 16:14:20 +09:00
Yukihiro "Matz" Matsumoto
13d0832965
allow quoted labels in hashes; fix #3231
2016-11-02 08:41:43 +09:00
Nobuyoshi Nakada
6511bfd79a
Removed trailing spaces
2016-09-28 12:29:41 +09:00
ksss
b1fa180ea3
Fix unexpected behavior with break
...
```
def yie
yield
end
def bre
yie {
1+1
break
}
end
p bre #=> display 2, but should be nil
```
2016-09-26 12:17:46 +09:00
Nozomi SATO
068b46d5e2
- fix mrbc_filename leak; cxt->filename would not be freed until the state is closed.
2016-09-04 18:35:23 +09:00
Nobuyoshi Nakada
73dd82e30a
parse.y: lparen_arg statement
...
allow parenthesised statement as a method argument.
reported [Feature:12686] in bugs.ruby-lang.org fixed in CRuby 2.4.
2016-08-19 11:11:54 +09:00
Nobuyoshi Nakada
bdd7e2bc8c
parse.y: fix chained assignments
...
fix syntax errors with chained assignment with op assign.
reported [Bug:12669] in bugs.ruby-lang.org fixed in CRuby 2.4.
2016-08-13 13:56:14 +09:00
Nobuyoshi Nakada
a06940daa9
parse.y: simplify 90e8ce5
...
simplify tOP_ASGN rules by command_rhs and arg_rhs rules with
%prec.
2016-08-12 10:14:35 +09:00
Yukihiro "Matz" Matsumoto
90e8ce5c30
parse.y: rescue modifiers for OP_ASGN should protect rhs only
...
reported in [Bug:12402] in bugs.ruby-lang.org fixed in CRuby 2.4
2016-08-11 16:27:14 +09:00
Yukihiro "Matz" Matsumoto
e635dc2a47
Merge pull request #3181 from sdottaka/fix-crash-on-mrb_parser_free
...
Fix crash in mrb_parser_free() due to freed memory access
2016-07-26 00:12:54 +09:00
Yukihiro "Matz" Matsumoto
34ac707ea3
OP_ASGN vsp may be negative
...
reported by https://gist.github.com/miura1729/53fbd8af889c289a79108e38635b2378
fix proposed by @miura1729 in
https://github.com/miura1729/mruby/commit/b1b7933f7aa950cfb747b06327a0d0340f3e4ff8
2016-07-25 11:34:55 +09:00
Takashi Sawanaka
2eefbfed9d
Fix crash in mrb_parser_free() due to freed memory access
2016-07-23 11:34:04 +09:00
Yukihiro "Matz" Matsumoto
d4d807b774
relax string length limitation to 64KB; fix #2725
2016-07-13 03:22:15 +09:00
Yukihiro "Matz" Matsumoto
44de80f76d
fix a compiler warning for uninitialized variable
2016-06-10 10:11:58 +09:00
Yukihiro "Matz" Matsumoto
6b0299f72b
fixed remaining bugs in OP_ASGN stack adjustment; close #3159
2016-05-16 15:36:36 +09:00