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
c6ce4330
Commit
c6ce4330
authored
Jul 09, 2014
by
take_cheeze
Committed by
Yukihiro "Matz" Matsumoto
Jul 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `SyntaxError` test and don't print compilation error to stderr in eval.
parent
d1eea450
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
mrbgems/mruby-eval/src/eval.c
mrbgems/mruby-eval/src/eval.c
+1
-0
mrbgems/mruby-eval/test/eval.rb
mrbgems/mruby-eval/test/eval.rb
+6
-0
No files found.
mrbgems/mruby-eval/src/eval.c
View file @
c6ce4330
...
...
@@ -112,6 +112,7 @@ create_proc_from_string(mrb_state *mrb, char *s, int len, mrb_value binding, cha
if
(
file
)
{
mrbc_filename
(
mrb
,
cxt
,
file
);
}
cxt
->
capture_errors
=
TRUE
;
p
=
mrb_parse_nstring
(
mrb
,
s
,
len
,
cxt
);
...
...
mrbgems/mruby-eval/test/eval.rb
View file @
c6ce4330
...
...
@@ -44,3 +44,9 @@ assert('rest arguments of eval') do
Kernel
.
eval
(
'[\'test\', __FILE__, __LINE__]'
,
nil
,
'test.rb'
,
10
)
end
end
assert
'eval syntax error'
do
assert_raise
(
SyntaxError
)
do
eval
'p "test'
end
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