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
950fe963
Commit
950fe963
authored
Apr 06, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
should have passed args to to_enum
parent
8808c9a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mrbgems/mruby-enum-ext/mrblib/enum.rb
mrbgems/mruby-enum-ext/mrblib/enum.rb
+3
-3
No files found.
mrbgems/mruby-enum-ext/mrblib/enum.rb
View file @
950fe963
...
...
@@ -517,7 +517,7 @@ module Enumerable
def
each_with_object
(
obj
=
nil
,
&
block
)
raise
ArgumentError
,
"wrong number of arguments (0 for 1)"
if
obj
==
nil
return
to_enum
:each_with_object
unless
block_given?
return
to_enum
(
:each_with_object
,
obj
)
unless
block_given?
self
.
each
{
|*
val
|
block
.
call
(
val
.
__svalue
,
obj
)
}
obj
...
...
@@ -574,7 +574,7 @@ module Enumerable
#
def
cycle
(
n
=
nil
,
&
block
)
return
to_enum
:cycle
if
!
block_given?
&&
n
==
nil
return
to_enum
(
:cycle
,
n
)
if
!
block_given?
&&
n
==
nil
ary
=
[]
if
n
==
nil
...
...
@@ -623,7 +623,7 @@ module Enumerable
#
def
find_index
(
val
=
NONE
,
&
block
)
return
to_enum
:find_index
if
!
block_given?
&&
val
==
NONE
return
to_enum
(
:find_index
,
val
)
if
!
block_given?
&&
val
==
NONE
idx
=
0
if
block
...
...
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