Skip to content
Browse files

1.9.2 compatibility fix: handle #to_ary calls on Proxy class for #fla…

…tten in 1.9.2
  • Loading branch information...
1 parent c7aa53b commit fdf103c6ad7c662225240b7f4968c6a85a213da8 @lsegal lsegal committed Jun 13, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/yard/code_objects/proxy.rb
View
4 lib/yard/code_objects/proxy.rb
@@ -186,10 +186,12 @@ def respond_to?(meth, include_private = false)
def method_missing(meth, *args, &block)
if obj = to_obj
obj.__send__(meth, *args, &block)
+ elsif meth == :to_ary # fixes bug in 1.9.2: http://gist.github.com/437136
+ nil
else
log.warn "Load Order / Name Resolution Problem on #{path}:"
log.warn "-"
- log.warn "Something is trying to access the object #{path} before it has been recognized."
+ log.warn "Something is trying to call #{meth} on object #{path} before it has been recognized."
log.warn "This error usually means that you need to modify the order in which you parse files"
log.warn "so that #{path} is parsed before methods or other objects attempt to access it."
log.warn "-"

0 comments on commit fdf103c

Please sign in to comment.
Something went wrong with that request. Please try again.