diff options
author | Kenta Murata <mrkn@users.noreply.github.com> | 2021-07-14 11:26:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-14 18:43:32 +0900 |
commit | 818c74b7f4d5b88833af26226fc81e563b5d11b9 (patch) | |
tree | 8b5271350f2d3394e43e648ce3dd70fbaf2eed80 /test | |
parent | 57a743efa408f0c47fc18dd16758a1a1cd54d296 (diff) | |
download | ruby-818c74b7f4d5b88833af26226fc81e563b5d11b9.tar.gz |
[ruby/fiddle] Return the module handle value in Fiddle::Handle#to_i and add FIddle::Handle#to_ptr (https://github.com/ruby/fiddle/pull/87)
https://github.com/ruby/fiddle/commit/170111a0cb
Diffstat (limited to 'test')
-rw-r--r-- | test/fiddle/test_handle.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb index 17f9c92a11..e89ad53e99 100644 --- a/test/fiddle/test_handle.rb +++ b/test/fiddle/test_handle.rb @@ -13,6 +13,12 @@ module Fiddle assert_kind_of Integer, handle.to_i end + def test_to_ptr + handle = Fiddle::Handle.new(LIBC_SO) + ptr = handle.to_ptr + assert_equal ptr.to_i, handle.to_i + end + def test_static_sym_unknown assert_raise(DLError) { Fiddle::Handle.sym('fooo') } assert_raise(DLError) { Fiddle::Handle['fooo'] } |