[前][次][番号順一覧][スレッド一覧]

ruby-changes:25999

From: usa <ko1@a...>
Date: Fri, 30 Nov 2012 20:15:45 +0900 (JST)
Subject: [ruby-changes:25999] usa:r38056 (trunk): * test/ruby/memory_status.rb (Memory::Win32): rescue non libffi user, such as ko1.

usa	2012-11-30 20:15:36 +0900 (Fri, 30 Nov 2012)

  New Revision: 38056

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38056

  Log:
    * test/ruby/memory_status.rb (Memory::Win32): rescue non libffi user, such as ko1.

  Modified files:
    trunk/test/ruby/memory_status.rb

Index: test/ruby/memory_status.rb
===================================================================
--- test/ruby/memory_status.rb	(revision 38055)
+++ test/ruby/memory_status.rb	(revision 38056)
@@ -15,7 +15,12 @@
     read_status {|k, v| keys << k; vals << v}
 
   when /mswin|mingw/ =~ RUBY_PLATFORM
-    require 'fiddle/import'
+    begin
+      require 'fiddle/import'
+    rescue LoadError
+      require 'dl/import'
+      ::Fiddle = ::DL
+    end
     require 'dl/types'
 
     module Win32

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]