Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
55842c5a
Commit
55842c5a
authored
Nov 25, 2016
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
resolve conflict; ref #3279
parents
d3ff9d31
73e4f069
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
+5
-1
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
+1
-1
test/t/codegen.rb
test/t/codegen.rb
+8
-0
No files found.
mrbgems/mruby-compiler/core/codegen.c
View file @
55842c5a
...
@@ -2295,7 +2295,11 @@ codegen(codegen_scope *s, node *tree, int val)
...
@@ -2295,7 +2295,11 @@ codegen(codegen_scope *s, node *tree, int val)
if
(
val
)
{
if
(
val
)
{
node
*
n
=
tree
;
node
*
n
=
tree
;
if
(
!
n
)
break
;
if
(
!
n
)
{
genop
(
s
,
MKOP_A
(
OP_LOADNIL
,
cursp
()));
push
();
break
;
}
codegen
(
s
,
n
->
car
,
VAL
);
codegen
(
s
,
n
->
car
,
VAL
);
n
=
n
->
cdr
;
n
=
n
->
cdr
;
while
(
n
)
{
while
(
n
)
{
...
...
mrbgems/mruby-compiler/core/parse.y
View file @
55842c5a
...
@@ -6541,7 +6541,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
...
@@ -6541,7 +6541,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
case NODE_HEREDOC:
case NODE_HEREDOC:
printf("NODE_HEREDOC (<<%s):\n", ((parser_heredoc_info*)tree)->term);
printf("NODE_HEREDOC (<<%s):\n", ((parser_heredoc_info*)tree)->term);
mrb_parser_dump
(mrb, ((parser_heredoc_info*)tree)->doc, offset+1);
dump_recur
(mrb, ((parser_heredoc_info*)tree)->doc, offset+1);
break;
break;
default:
default:
...
...
test/t/codegen.rb
View file @
55842c5a
...
@@ -46,3 +46,11 @@ assert('method call with exactly 127 arguments') do
...
@@ -46,3 +46,11 @@ assert('method call with exactly 127 arguments') do
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
)
)
end
end
assert
(
'nested empty heredoc'
)
do
_
,
a
=
nil
,
<<
B
#{
<<
A
}
A
B
assert_equal "
\n
", a
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment