diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-05 23:38:35 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-05 23:38:35 +0000 |
commit | ff10d93563e740d02a7a9815df9bd7b7d4b6d3d5 (patch) | |
tree | b912b3d1fe7e47b3bcbfa4efc673604c2376792d /test/dl/test_import.rb | |
parent | c27e0ebab690d2a6c709a5a2c83af2d7a4968492 (diff) | |
download | ruby-ff10d93563e740d02a7a9815df9bd7b7d4b6d3d5.tar.gz |
* ext/dl/lib/dl/import.rb (handler): add a more helpful error message
when calling import_symbol or import_function without calling
dlload. Thanks nobu! [ruby-core:30996]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl/test_import.rb')
-rw-r--r-- | test/dl/test_import.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/dl/test_import.rb b/test/dl/test_import.rb index 56a417f9ab..64cbf53fbc 100644 --- a/test/dl/test_import.rb +++ b/test/dl/test_import.rb @@ -41,6 +41,15 @@ module DL end class TestImport < TestBase + def test_ensure_call_dlload + err = assert_raises(RuntimeError) do + Class.new do + extend DL::Importer + extern "void *strcpy(char*, char*)" + end + end + end + def test_malloc() s1 = LIBC::Timeval.malloc() s2 = LIBC::Timeval.malloc() |