Skip to content

Commit 69c96e1

Browse files
committed
Add Native#to_a and Native#to_ary
1 parent 16af36e commit 69c96e1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

corelib/native.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,14 @@ def class
293293
`self._klass`
294294
end
295295

296+
def to_a(options = {}, &block)
297+
Native::Array.new(@native, options, &block).to_a
298+
end
299+
300+
def to_ary(options = {}, &block)
301+
Native::Array.new(@native, options, &block)
302+
end
303+
296304
def inspect
297305
"#<Native:#{`String(#@native)`}>"
298306
end

0 commit comments

Comments
 (0)