Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix an inner method Range#can_iterate_from? #2273

Merged
merged 1 commit into from

2 participants

@kachick
Collaborator

refer #2272

@kachick kachick Fix an inner method Range#can_iterate_from?
Prefer protected to private
--------------------------------------

* This method is just used by `self.each`.

Replace receiver for X19
------------------------

* `first` is gotten the `self.each`

refer
-----

  * rubinius#2272 (diff)
  * #2272
5055f4a
@dbussink dbussink merged commit 462ed4c into from
@kachick

Woops!

@dbussink
Owner

Thanks!

@dbussink
Owner

Hmm, Travis passed? Weird...

@dbussink
Owner

You want to create a new pull request do use the right names?

@kachick kachick referenced this pull request from a commit in kachick/rubinius
@kachick kachick Fix typo 7d3eb5b
@kachick kachick referenced this pull request
Merged

Fix typo #2274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 12, 2013
  1. @kachick

    Fix an inner method Range#can_iterate_from?

    kachick authored
    Prefer protected to private
    --------------------------------------
    
    * This method is just used by `self.each`.
    
    Replace receiver for X19
    ------------------------
    
    * `first` is gotten the `self.each`
    
    refer
    -----
    
      * rubinius#2272 (diff)
      * #2272
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 5 deletions.
  1. +1 −2  kernel/common/range18.rb
  2. +2 −3 kernel/common/range19.rb
View
3  kernel/common/range18.rb
@@ -42,9 +42,8 @@ def each(&block)
alias_method :first, :begin
alias_method :last, :end
- protected
-
def can_iterate_from?(object)
object.respond_to? :succ
end
+ private :can_iterate_from
end
View
5 kernel/common/range19.rb
@@ -80,9 +80,8 @@ def min(&block)
@begin
end
- protected
-
def can_iterate_from?(object)
- first.respond_to?(:succ) && !object.kind_of?(Time)
+ object.respond_to?(:succ) && !object.kind_of?(Time)
end
+ private :can_iterate_from
end
Something went wrong with that request. Please try again.