summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dl/lib/dl/import.rb24
-rw-r--r--ext/dl/test/test_import.rb2
2 files changed, 13 insertions, 13 deletions
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb
index ebd84eb471..4158d9d019 100644
--- a/ext/dl/lib/dl/import.rb
+++ b/ext/dl/lib/dl/import.rb
@@ -118,12 +118,12 @@ module DL
f = import_function(symname, ctype, argtype, opt[:call_type])
name = symname.gsub(/@.+/,'')
@func_map[name] = f
- #define_method(name){|*args,&block| f.call(*args,&block)}
- module_eval(<<-EOS)
- def #{name}(*args, &block)
- @func_map['#{name}'].call(*args,&block)
- end
- EOS
+ define_method(name){|*args,&block| f.call(*args,&block)}
+ #module_eval(<<-EOS)
+ # def #{name}(*args, &block)
+ # @func_map['#{name}'].call(*args,&block)
+ # end
+ #EOS
module_function(name)
f
end
@@ -142,12 +142,12 @@ module DL
raise(RuntimeError, "unknown callback type: #{h[:callback_type]}")
end
@func_map[name] = f
- #define_method(name){|*args,&block| f.call(*args,&block)}
- module_eval(<<-EOS)
- def #{name}(*args,&block)
- @func_map['#{name}'].call(*args,&block)
- end
- EOS
+ define_method(name){|*args,&block| f.call(*args,&block)}
+ #module_eval(<<-EOS)
+ # def #{name}(*args,&block)
+ # @func_map['#{name}'].call(*args,&block)
+ # end
+ #EOS
module_function(name)
f
end
diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb
index 14fb1eba65..c96c330a8c 100644
--- a/ext/dl/test/test_import.rb
+++ b/ext/dl/test/test_import.rb
@@ -54,7 +54,7 @@ module DL
def test_io()
io_in,io_out = IO.pipe()
- LIBC.fprintf(DL::CPtr[io_out], "hello")
+ LIBC.fprintf(io_out, "hello")
io_out.flush()
io_out.close()
str = io_in.read()