[Hiki-cvs 1419] [966] use literal instead of obviously new method.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 8月 15日 (土) 12:03:38 JST


Revision: 966
          http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=966
Author:   okkez
Date:     2009-08-15 12:03:38 +0900 (Sat, 15 Aug 2009)

Log Message:
-----------
use literal instead of obviously new method.

Modified Paths:
--------------
    hiki/trunk/hiki/aliaswiki.rb
    hiki/trunk/hiki/db/flatfile.rb
    hiki/trunk/hiki/docdiff/charstring.rb
    hiki/trunk/hiki/docdiff/diff/contours.rb
    hiki/trunk/hiki/interwiki.rb

Modified: hiki/trunk/hiki/aliaswiki.rb
===================================================================
--- hiki/trunk/hiki/aliaswiki.rb	2009-08-14 20:46:18 UTC (rev 965)
+++ hiki/trunk/hiki/aliaswiki.rb	2009-08-15 03:03:38 UTC (rev 966)
@@ -10,7 +10,7 @@
     attr_reader :aliaswiki_names
 
     def initialize(str)
-      @aliaswiki_names = Hash::new
+      @aliaswiki_names = {}
       (str || '').scan( ALIASWIKI_NAME_RE ) do |i|
         @aliaswiki_names[i[0]] = i[1]
       end

Modified: hiki/trunk/hiki/db/flatfile.rb
===================================================================
--- hiki/trunk/hiki/db/flatfile.rb	2009-08-14 20:46:18 UTC (rev 965)
+++ hiki/trunk/hiki/db/flatfile.rb	2009-08-15 03:03:38 UTC (rev 966)
@@ -107,7 +107,7 @@
     end
 
     def page_info
-      h = Array::new
+      h = []
       @info.transaction(true) do
         @info.roots.each { |a| h << {a.unescape => @info[a]} }
       end

Modified: hiki/trunk/hiki/docdiff/charstring.rb
===================================================================
--- hiki/trunk/hiki/docdiff/charstring.rb	2009-08-14 20:46:18 UTC (rev 965)
+++ hiki/trunk/hiki/docdiff/charstring.rb	2009-08-15 03:03:38 UTC (rev 966)
@@ -6,8 +6,8 @@
 #require 'iconv'
 module CharString
 
-  Encodings = Hash.new
-  EOLChars = Hash.new  # End-of-line characters, such as CR, LF, CRLF.
+  Encodings = {}
+  EOLChars = {}  # End-of-line characters, such as CR, LF, CRLF.
 
   def initialize(string)
 =begin unnecessary

Modified: hiki/trunk/hiki/docdiff/diff/contours.rb
===================================================================
--- hiki/trunk/hiki/docdiff/diff/contours.rb	2009-08-14 20:46:18 UTC (rev 965)
+++ hiki/trunk/hiki/docdiff/diff/contours.rb	2009-08-15 03:03:38 UTC (rev 966)
@@ -312,7 +312,7 @@
       def initialize(arr)
         @n = arr.length + 1
 
-        @table = Array.new
+        @table = []
         arr.each_index {|i|
           s = arr[i]
           @table[s] = [-1] unless @table[s]

Modified: hiki/trunk/hiki/interwiki.rb
===================================================================
--- hiki/trunk/hiki/interwiki.rb	2009-08-14 20:46:18 UTC (rev 965)
+++ hiki/trunk/hiki/interwiki.rb	2009-08-15 03:03:38 UTC (rev 966)
@@ -11,7 +11,7 @@
     attr_reader :interwiki_names
 
     def initialize( str )
-      @interwiki_names = Hash.new
+      @interwiki_names = {}
       (str || '').scan( INTERWIKI_NAME_RE ) do |i|
         e = i.size > 2 ? i[2] : 'none'
         @interwiki_names[i[0]] = {:url => i[1], :encoding => e}




Hiki-cvs メーリングリストの案内
Back to archive index