Commit 35cdaa54 by Jon Yurek

Tests pass in Rubinius 1.1.0

parent fa7ee7ca
...@@ -41,8 +41,9 @@ module Paperclip ...@@ -41,8 +41,9 @@ module Paperclip
# Returns the interpolated URL. Will raise an error if the url itself # Returns the interpolated URL. Will raise an error if the url itself
# contains ":url" to prevent infinite recursion. This interpolation # contains ":url" to prevent infinite recursion. This interpolation
# is used in the default :path to ease default specifications. # is used in the default :path to ease default specifications.
RIGHT_HERE = "#{__FILE__.gsub(%r{^\./}, "")}:#{__LINE__ + 3}"
def url attachment, style_name def url attachment, style_name
raise InfiniteInterpolationError if caller.any?{|b| b.index("#{__FILE__}:#{__LINE__ + 1}") } raise InfiniteInterpolationError if caller.any?{|b| b.index(RIGHT_HERE) }
attachment.url(style_name, false) attachment.url(style_name, false)
end end
......
...@@ -606,7 +606,7 @@ class AttachmentTest < Test::Unit::TestCase ...@@ -606,7 +606,7 @@ class AttachmentTest < Test::Unit::TestCase
[:large, :medium, :small].each do |style| [:large, :medium, :small].each do |style|
io = @attachment.to_file(style) io = @attachment.to_file(style)
# p "in commit to disk test, io is #{io.inspect} and @instance.id is #{@instance.id}" # p "in commit to disk test, io is #{io.inspect} and @instance.id is #{@instance.id}"
assert File.exists?(io) assert File.exists?(io.path)
assert ! io.is_a?(::Tempfile) assert ! io.is_a?(::Tempfile)
io.close io.close
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment