[logaling-commit] logaling/logaling-command [master] Fix problem when Application#run_pager called on Windows

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
Tue Mar 13 18:45:04 JST 2012


SHIMADA Koji	2012-03-13 18:45:04 +0900 (Tue, 13 Mar 2012)

  New Revision: 7731be1e35a043b3162d57ce94af7e356af9d9ef

  Log:
    Fix problem when Application#run_pager called on Windows

  Modified files:
    lib/logaling/command/application.rb

  Modified: lib/logaling/command/application.rb (+5 -1)
===================================================================
--- lib/logaling/command/application.rb    2012-03-13 17:34:29 +0900 (7761a90)
+++ lib/logaling/command/application.rb    2012-03-13 18:45:04 +0900 (d2b4557)
@@ -299,6 +299,10 @@ module Logaling::Command
     end
 
     private
+    def windows?
+      RUBY_PLATFORM =~ /win32|mingw32/i
+    end
+
     def glossary
       @glossary ||= Logaling::Glossary.new(@config.glossary, @config.source_language, @config.target_language, @logaling_home)
     end
@@ -337,7 +341,7 @@ module Logaling::Command
     # http://nex-3.com/posts/73-git-style-automatic-paging-in-ruby
     def run_pager
       return if options["no-pager"]
-      return if ::RUBY_PLATFORM =~ /win32/
+      return if windows?
       return unless STDOUT.tty?
 
       read, write = IO.pipe




More information about the logaling-commit mailing list
アーカイブの一覧に戻る