From 89878a056bc5c46e54a8df43f6f2969e05f8045c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 29 Apr 2011 22:42:30 +0200 Subject: fix ArgumentError in various constructors --- lib/efl/eina_hash.rb | 2 +- lib/efl/eina_list.rb | 4 ++-- lib/efl/evas.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/efl/eina_hash.rb b/lib/efl/eina_hash.rb index dcbafa2..f9435c7 100644 --- a/lib/efl/eina_hash.rb +++ b/lib/efl/eina_hash.rb @@ -36,7 +36,7 @@ module Efl o.each do |k,v| Efl::EinaHash.eina_hash_add ptr, k, v end ptr else - raise ArgumentError.new "#{ptr.class} valid argument" + raise ArgumentError.new "wrong argument #{o.class.name}" end ) end diff --git a/lib/efl/eina_list.rb b/lib/efl/eina_list.rb index e67c037..e0e0d36 100644 --- a/lib/efl/eina_list.rb +++ b/lib/efl/eina_list.rb @@ -10,7 +10,7 @@ class Array elsif o.is_a? FFI::Pointer Efl::EinaList::REinaList.new(o).to_ary else - raise ArgumentError.new " wrong argument #{o.class.name}" + raise ArgumentError.new "wrong argument #{o.class.name}" end end end @@ -41,7 +41,7 @@ module Efl when Array o.inject(FFI::Pointer::NULL) { |p,e| Efl::EinaList.eina_list_append p, e } else - raise ArgumentError.new "#{ptr.class} valid argument" + raise ArgumentError.new "wrong argument #{o.class.name}" end ) end diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb index 2b4e61d..e54b07f 100644 --- a/lib/efl/evas.rb +++ b/lib/efl/evas.rb @@ -58,7 +58,7 @@ module Efl when FFI::Pointer FFI::AutoPointer.new o, method(:free) else - raise ArgumentError.new "#{o.class} valid argument" + raise ArgumentError.new "wrong argument #{o.class.name}" end ) yield self if block_given? @@ -115,7 +115,7 @@ module Efl when FFI::Pointer FFI::AutoPointer.new o, method(:free) else - raise ArgumentError.new "#{o.class} valid argument" + raise ArgumentError.new "wrong argument #{o.class.name}" end ) yield self if block_given? -- cgit v1.1-2-g2b99