Skip to content

Commit

Permalink
Tests pass in Rubinius 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Nov 12, 2010
1 parent fa7ee7c commit 35cdaa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/paperclip/interpolations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def filename attachment, style_name
# Returns the interpolated URL. Will raise an error if the url itself
# contains ":url" to prevent infinite recursion. This interpolation
# is used in the default :path to ease default specifications.
RIGHT_HERE = "#{__FILE__.gsub(%r{^\./}, "")}:#{__LINE__ + 3}"
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)
end

Expand Down
2 changes: 1 addition & 1 deletion test/attachment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def do_after_all; end
[:large, :medium, :small].each do |style|
io = @attachment.to_file(style)
# 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)
io.close
end
Expand Down

0 comments on commit 35cdaa5

Please sign in to comment.