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
16884b87
Commit
16884b87
authored
Jan 14, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2702 from takahashim/fix-string-match
fix infinite loop in String#match(arg) when arg is String
parents
d405eb55
bcceeba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
mrblib/string.rb
mrblib/string.rb
+10
-1
No files found.
mrblib/string.rb
View file @
16884b87
...
...
@@ -146,7 +146,16 @@ class String
##
# ISO 15.2.10.5.27
def
match
(
re
,
&
block
)
re
.
match
(
self
,
&
block
)
if
re
.
respond_to?
:to_str
if
Object
.
const_defined?
(
:Regexp
)
r
=
Regexp
.
new
(
re
)
r
.
match
(
self
,
&
block
)
else
raise
NotImplementedError
,
"String#match needs Regexp class"
end
else
re
.
match
(
self
,
&
block
)
end
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