mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/date/lib/date.rb: fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									7ce520e90a
								
							
						
					
					
						commit
						2f00c56eb7
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -29,11 +29,11 @@ class Date
 | 
			
		|||
      when Infinity; return d <=> other.d
 | 
			
		||||
      when Numeric; return d
 | 
			
		||||
      else
 | 
			
		||||
	begin
 | 
			
		||||
	  l, r = other.coerce(self)
 | 
			
		||||
	  return l <=> r
 | 
			
		||||
	rescue NoMethodError
 | 
			
		||||
	end
 | 
			
		||||
        begin
 | 
			
		||||
          l, r = other.coerce(self)
 | 
			
		||||
          return l <=> r
 | 
			
		||||
        rescue NoMethodError
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
      nil
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			@ -42,16 +42,16 @@ class Date
 | 
			
		|||
      case other
 | 
			
		||||
      when Numeric; return -d, d
 | 
			
		||||
      else
 | 
			
		||||
	super
 | 
			
		||||
        super
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def to_f
 | 
			
		||||
      return 0 if @d == 0
 | 
			
		||||
      if @d > 0
 | 
			
		||||
	Float::INFINITY
 | 
			
		||||
        Float::INFINITY
 | 
			
		||||
      else
 | 
			
		||||
	-Float::INFINITY
 | 
			
		||||
        -Float::INFINITY
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue