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

ruby-changes:4684

From: ko1@a...
Date: Thu, 24 Apr 2008 16:39:02 +0900 (JST)
Subject: [ruby-changes:4684] nagai - Ruby:r16178 (ruby_1_8): * ext/tk/sample/ttk_wrapper.rb: should show usage when no script is given.

nagai	2008-04-24 16:38:54 +0900 (Thu, 24 Apr 2008)

  New Revision: 16178

  Modified files:
    branches/ruby_1_8/ext/tk/sample/ttk_wrapper.rb

  Log:
    * ext/tk/sample/ttk_wrapper.rb: should show usage when no script is given.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/sample/ttk_wrapper.rb?r1=16178&r2=16177&diff_format=u

Index: ruby_1_8/ext/tk/sample/ttk_wrapper.rb
===================================================================
--- ruby_1_8/ext/tk/sample/ttk_wrapper.rb	(revision 16177)
+++ ruby_1_8/ext/tk/sample/ttk_wrapper.rb	(revision 16178)
@@ -4,7 +4,7 @@
 #
 #                       by Hidetoshi NAGAI (nagai@a...)
 #
-version = '0.1'
+version = '0.1.1'
 #
 ##########################################################################
 #  parse commandline arguments
@@ -144,7 +144,7 @@
 ##########################################################################
 #  load script
 ##########################################################################
-if (script = File.expand_path(ARGV.shift))
+if (path = ARGV.shift) && (script = File.expand_path(path))
   print "load script \"#{script}\"\n" if OPTS[:verbose]
   load(script)
 else

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

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