Skip to content

Commit

Permalink
Add Native#to_a and Native#to_ary
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Nov 5, 2013
1 parent 16af36e commit 69c96e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions corelib/native.rb
Expand Up @@ -293,6 +293,14 @@ def class
`self._klass`
end

def to_a(options = {}, &block)
Native::Array.new(@native, options, &block).to_a
end

def to_ary(options = {}, &block)
Native::Array.new(@native, options, &block)
end

def inspect
"#<Native:#{`String(#@native)`}>"
end
Expand Down

0 comments on commit 69c96e1

Please sign in to comment.