Browse files

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

…tten in 1.9.2
  • Loading branch information...
lsegal committed Jun 14, 2010
1 parent c7aa53b commit fdf103c6ad7c662225240b7f4968c6a85a213da8
Showing with 3 additions and 1 deletion.
  1. +3 −1 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:
+ nil
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.