1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/dl/cfunc.c (**) updating documentation

* test/dl/test_cfunc.rb (test_ptr=, test_ptr) testing the pointer
  accessor methods on CFunc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2009-11-08 00:21:41 +00:00
parent 355a7bc3a5
commit 5de564634d
2 changed files with 46 additions and 6 deletions

View file

@ -9,6 +9,15 @@ module DL
@cf = CFunc.new(@libc[@name], TYPE_VOIDP, @name)
end
def test_ptr=
@cf.ptr = @libc['malloc']
assert_equal @cf.ptr, @libc['malloc']
end
def test_ptr
assert_equal @cf.ptr, @libc[@name]
end
def test_set_calltype
@cf.calltype = :foo
assert_equal :foo, @cf.calltype