summaryrefslogtreecommitdiffstats
path: root/lib/efl/eina_list.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-03 23:28:35 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-03 23:28:35 +0200
commit0983cae5aa1b6ac3cea67e7c93a13ff74131da62 (patch)
tree51831b1dc4473fe3122fe29b733680f934a67520 /lib/efl/eina_list.rb
parent0fb177e534197d351ccb091027f8416feb93e3a7 (diff)
downloadffi-efl-0983cae5aa1b6ac3cea67e7c93a13ff74131da62.zip
ffi-efl-0983cae5aa1b6ac3cea67e7c93a13ff74131da62.tar.gz
REinaList#each doesn't need to iterate if no block is given
Diffstat (limited to 'lib/efl/eina_list.rb')
-rw-r--r--lib/efl/eina_list.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/efl/eina_list.rb b/lib/efl/eina_list.rb
index ea59f89..0d73c29 100644
--- a/lib/efl/eina_list.rb
+++ b/lib/efl/eina_list.rb
@@ -37,6 +37,7 @@ module Efl
@ptr = nil
end
def each
+ return if not block_given?
p = @ptr
while p!=::FFI::Pointer::NULL
l = Efl::EinaList::EinaListStruct.new p