svnno****@sourc*****
svnno****@sourc*****
2009年 8月 16日 (日) 02:41:29 JST
Revision: 973 http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=973 Author: fdiary Date: 2009-08-16 02:41:29 +0900 (Sun, 16 Aug 2009) Log Message: ----------- * hiki/util.rb (word_diff): 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/util.rb Modified: hiki/trunk/ChangeLog =================================================================== --- hiki/trunk/ChangeLog 2009-08-15 17:34:35 UTC (rev 972) +++ hiki/trunk/ChangeLog 2009-08-15 17:41:29 UTC (rev 973) @@ -5,6 +5,7 @@ * 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 (word_diff): ditto. * 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. Modified: hiki/trunk/hiki/util.rb =================================================================== --- hiki/trunk/hiki/util.rb 2009-08-15 17:34:35 UTC (rev 972) +++ hiki/trunk/hiki/util.rb 2009-08-15 17:41:29 UTC (rev 973) @@ -114,9 +114,9 @@ :end_after_change => '</ins>', } if digest - return View.new( diff, src.encoding, src.eol ).to_html_digest(overriding_tags, false).to_s.gsub( %r|<br />|, '' ).gsub( %r|\n</ins>|, "</ins>\n" ) + return View.new( diff, src.encoding, src.eol ).to_html_digest(overriding_tags, false).join.gsub( %r|<br />|, '' ).gsub( %r|\n</ins>|, "</ins>\n" ) else - return View.new( diff, src.encoding, src.eol ).to_html(overriding_tags, false).to_s.gsub( %r|<br />|, '' ).gsub( %r|\n</ins>|, "</ins>\n" ) + return View.new( diff, src.encoding, src.eol ).to_html(overriding_tags, false).join.gsub( %r|<br />|, '' ).gsub( %r|\n</ins>|, "</ins>\n" ) end end