Skip to content

Commit

Permalink
Fix Native::Array#[]
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Sep 23, 2013
1 parent 9de733f commit 9aa37c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corelib/native.rb
Expand Up @@ -95,10 +95,10 @@ def each(&block)
def [](index)
result = case index
when String, Symbol
@named ? `#@native.#@named(#{index})` : `#@native[#{index}]`
@named ? `#@native[#@named](#{index})` : `#@native[#{index}]`

when Integer
@get ? `#@native.#@get(#{index})` : `#@native[#{index}]`
@get ? `#@native[#@get](#{index})` : `#@native[#{index}]`
end

if result
Expand Down

0 comments on commit 9aa37c3

Please sign in to comment.