Permalink
Browse files

treat includes and methods alike

  • Loading branch information...
1 parent 628bfaa commit 13a3cfea4a66eadb0722d749184c7c8ef56fdab7 @mkristian committed Mar 13, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/ixtlan/babel/context.rb
@@ -55,7 +55,11 @@ def array?
end
def []( key )
- self.class.new( @include.is_a?( Array ) ? {} : @include[ key ] )
+ if @include.include?( key )
+ self.class.new( @include.is_a?( Array ) ? {} : @include[ key ] )
+ else
+ self.class.new( @methods.is_a?( Array ) ? {} : @methods[ key ] )
+ end
end
end

0 comments on commit 13a3cfe

Please sign in to comment.