summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ext/dl/lib/dl/struct.rb1
-rw-r--r--ext/dl/lib/dl/value.rb2
-rw-r--r--test/dl/test_c_struct_entry.rb2
-rw-r--r--test/dl/test_c_union_entity.rb2
5 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 40dba2f..573f317 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Wed Oct 31 02:53:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]
+
+ * ext/dl/lib/dl/value.rb: ditto
+
+ * test/dl/test_c_struct_entry.rb: remove strange require order from
+ tests.
+
+ * test/dl/test_c_union_entity.rb: ditto
+
Tue Oct 30 23:59:32 2012 Shugo Maeda <shugo@ruby-lang.org>
* eval.c (rb_mod_refine): fix the error message when no block is
diff --git a/ext/dl/lib/dl/struct.rb b/ext/dl/lib/dl/struct.rb
index db27208..9359ca4 100644
--- a/ext/dl/lib/dl/struct.rb
+++ b/ext/dl/lib/dl/struct.rb
@@ -1,4 +1,5 @@
require 'dl'
+require 'dl/value'
require 'dl/pack.rb'
module DL
diff --git a/ext/dl/lib/dl/value.rb b/ext/dl/lib/dl/value.rb
index e99e3cf..147d9d1 100644
--- a/ext/dl/lib/dl/value.rb
+++ b/ext/dl/lib/dl/value.rb
@@ -46,6 +46,8 @@ module DL
end
def wrap_arg(arg, ty, funcs = [], &block)
+ require 'dl/func'
+
funcs ||= []
case arg
when nil
diff --git a/test/dl/test_c_struct_entry.rb b/test/dl/test_c_struct_entry.rb
index 4f51ffb..414f17b 100644
--- a/test/dl/test_c_struct_entry.rb
+++ b/test/dl/test_c_struct_entry.rb
@@ -1,7 +1,5 @@
require_relative 'test_base'
-require 'dl/func'
-require 'dl/value'
require 'dl/struct'
class DL::TestCStructEntity < DL::TestBase
diff --git a/test/dl/test_c_union_entity.rb b/test/dl/test_c_union_entity.rb
index 1683fc4..29b9e10 100644
--- a/test/dl/test_c_union_entity.rb
+++ b/test/dl/test_c_union_entity.rb
@@ -1,7 +1,5 @@
require_relative 'test_base'
-require 'dl/func'
-require 'dl/value'
require 'dl/struct'
class DL::TestCUnionEntity < DL::TestBase