aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

#previous! depending on Ruby version

Open EricR opened this issue 12 years ago • 0 comments
trafficstars

Starting on line 29 in /lib/aws/s3/extensions.rb:

  if RUBY_VERSION <= '1.9'
    def previous!
      self[-1] -= 1
      self
    end
  else
    def previous!
      self[-1] = (self[-1].ord - 1).chr
      self
    end
  end

Would subtracting 1 from a string ever work in Ruby 1.9? I'm guessing this is a feature in 2.0, but this bit seems to be breaking the S3 gem for us while we're running 1.9.3.

EricR avatar Mar 11 '13 19:03 EricR