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
95a92d35
Commit
95a92d35
authored
May 02, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify overflow error class for conversion to integer to `RangeError`
parent
eeb78a72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/numeric.c
src/numeric.c
+1
-1
src/string.c
src/string.c
+1
-1
No files found.
src/numeric.c
View file @
95a92d35
...
...
@@ -1230,7 +1230,7 @@ mrb_flo_to_fixnum(mrb_state *mrb, mrb_value x)
z
=
(
mrb_int
)
d
;
}
else
{
mrb_raisef
(
mrb
,
E_
ARGUMENT
_ERROR
,
"number (%S) too big for integer"
,
x
);
mrb_raisef
(
mrb
,
E_
RANGE
_ERROR
,
"number (%S) too big for integer"
,
x
);
}
}
return
mrb_fixnum_value
(
z
);
...
...
src/string.c
View file @
95a92d35
...
...
@@ -2115,7 +2115,7 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, mrb_int len, mrb_int base,
else
#endif
{
mrb_raisef
(
mrb
,
E_
ARGUMENT
_ERROR
,
"string (%S) too big for integer"
,
mrb_raisef
(
mrb
,
E_
RANGE
_ERROR
,
"string (%S) too big for integer"
,
mrb_str_new
(
mrb
,
str
,
pend
-
str
));
}
}
...
...
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