[Hiki-cvs 1422] [969] * hiki/docdiff/view.rb (apply_style, apply_style_digest): use

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 8月 15日 (土) 16:16:41 JST


Revision: 969
          http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=969
Author:   fdiary
Date:     2009-08-15 16:16:41 +0900 (Sat, 15 Aug 2009)

Log Message:
-----------
	* hiki/docdiff/view.rb (apply_style, apply_style_digest): use
	Array#join instead of Array#to_s, whose specification is different
	between Ruby 1.8 and Ruby 1.9.

Modified Paths:
--------------
    hiki/trunk/ChangeLog
    hiki/trunk/hiki/docdiff/view.rb

Modified: hiki/trunk/ChangeLog
===================================================================
--- hiki/trunk/ChangeLog	2009-08-15 06:42:39 UTC (rev 968)
+++ hiki/trunk/ChangeLog	2009-08-15 07:16:41 UTC (rev 969)
@@ -1,4 +1,8 @@
 2009-08-15  Kazuhiko  <kazuh****@fdiar*****>
+	* hiki/docdiff/view.rb (apply_style, apply_style_digest): use
+	Array#join instead of Array#to_s, whose specification is different
+	between Ruby 1.8 and Ruby 1.9.
+
 	* hiki/util.rb (unified_diff): use String#split(/^/) instead of
 	String#to_a, that works on both (old) Ruby-1.8 and Ruby-1.9.
 
@@ -19,7 +23,7 @@
 	required for Ruby 1.9.
 
 	* hiki/db/tmarshal.rb: use Array#join instead of Array#to_s, whose
-	specification is different between Ruby 1.8 and Ruby 1.9
+	specification is different between Ruby 1.8 and Ruby 1.9.
 
 2009-08-09  Kazuhiko  <kazuh****@fdiar*****>
 	* Hiki 0.8.8 released!

Modified: hiki/trunk/hiki/docdiff/view.rb
===================================================================
--- hiki/trunk/hiki/docdiff/view.rb	2009-08-15 06:42:39 UTC (rev 968)
+++ hiki/trunk/hiki/docdiff/view.rb	2009-08-15 07:16:41 UTC (rev 969)
@@ -57,11 +57,11 @@
     @difference.each{|block|
       operation = block.first
       if block_given?
-        source = yield block[1].to_s
-        target = yield block[2].to_s
+        source = yield block[1].join rescue ''
+        target = yield block[2].join rescue ''
       else
-        source = block[1].to_s
-        target = block[2].to_s
+        source = block[1].join rescue ''
+        target = block[2].join rescue ''
       end
       case operation
       when :common_elt_elt
@@ -95,11 +95,11 @@
     d2l = doc2_line_number = 1
     @difference.each_with_index{|entry, i|
       if block_given?
-        source = yield entry[1].to_s
-        target = yield entry[2].to_s
+        source = yield entry[1].join rescue ''
+        target = yield entry[2].join rescue ''
       else
-        source = entry[1].to_s
-        target = entry[2].to_s
+        source = entry[1].join rescue ''
+        target = entry[2].join rescue ''
       end
       if  i == 0
         context_pre  = ""  # no pre context for the first entry




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