summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 23:08:26 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 23:08:26 +0000
commit3977dbc57674bc2aab0beb33b84195c23e1d6a04 (patch)
tree80f5a915eded87371708fa9af98d2dcba7d8b63d /ext/dl/lib/dl
parentc47ca1f02f514ecf765877414bfacceb1402d011 (diff)
Use define_method instead of module_eval.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl')
-rw-r--r--ext/dl/lib/dl/import.rb24
1 files changed, 12 insertions, 12 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