diff options
Diffstat (limited to 'lib/efl')
-rw-r--r-- | lib/efl/ffi.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efl/ffi.rb b/lib/efl/ffi.rb index fe2ec78..05c9cbd 100644 --- a/lib/efl/ffi.rb +++ b/lib/efl/ffi.rb @@ -68,6 +68,9 @@ module Efl end # module ClassHelper + def to_a; [self] end + def to_ary; [self] end + def to_s; Object.instance_method(:to_s).bind(self).call+' ['+self.to_ptr.to_s+']' end def to_ptr; @ptr; end def === o; @ptr === o.to_ptr; end def address; @ptr.address; end @@ -115,7 +118,6 @@ module Efl return self.send m, *args, &block end end - return [self.to_s+' ['+self.to_ptr.to_s+']'] if m_s=~/^to_ary$/ Kernel.raise NameError.new "#{self.class.name} is unable to resolve #{m} within #{self.class.search_prefixes.inspect}" end end |