summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-29 22:42:30 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-29 22:42:30 +0200
commit89878a056bc5c46e54a8df43f6f2969e05f8045c (patch)
tree195d5431b57d588bc0e99772aea53455f3cbad22
parent19b9118fccb1766fa55fd920853c7e2767816969 (diff)
downloadffi-efl-89878a056bc5c46e54a8df43f6f2969e05f8045c.zip
ffi-efl-89878a056bc5c46e54a8df43f6f2969e05f8045c.tar.gz
fix ArgumentError in various constructors
-rw-r--r--lib/efl/eina_hash.rb2
-rw-r--r--lib/efl/eina_list.rb4
-rw-r--r--lib/efl/evas.rb4
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?