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

ruby-changes:33000

From: naruse <ko1@a...>
Date: Fri, 21 Feb 2014 23:06:35 +0900 (JST)
Subject: [ruby-changes:33000] naruse:r45079 (ruby_2_1): merge revision(s) 44531: [Backport #9300]

naruse	2014-02-21 23:06:17 +0900 (Fri, 21 Feb 2014)

  New Revision: 45079

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45079

  Log:
    merge revision(s) 44531: [Backport #9300]
    
    * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
      quotes should not have changed.  [ruby-core:59316] [Bug #9300]
    
    * ext/psych/lib/psych.rb: fixed missing require.
    
    * test/psych/test_string.rb: test

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/psych/lib/psych/visitors/yaml_tree.rb
    branches/ruby_2_1/ext/psych/lib/psych.rb
    branches/ruby_2_1/test/psych/test_string.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 45078)
+++ ruby_2_1/ChangeLog	(revision 45079)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Fri Feb 21 23:00:34 2014  Aaron Patterson <aaron@t...>
+
+	* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
+	  quotes should not have changed.  [ruby-core:59316] [Bug #9300]
+
+	* ext/psych/lib/psych.rb: fixed missing require.
+
+	* test/psych/test_string.rb: test
+
 Sun Feb 2 05:48:42 2014  Eric Wong <e@8...>
 
 	* io.c (rb_io_syswrite): add RB_GC_GUARD
Index: ruby_2_1/ext/psych/lib/psych/visitors/yaml_tree.rb
===================================================================
--- ruby_2_1/ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 45078)
+++ ruby_2_1/ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 45079)
@@ -284,7 +284,7 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/psych/lib/psych/visitors/yaml_tree.rb#L284
           quote = false
         elsif o =~ /\n/
           style = Nodes::Scalar::LITERAL
-        elsif o =~ /^\W/
+        elsif o =~ /^\W[^"]*$/
           style = Nodes::Scalar::DOUBLE_QUOTED
         else
           unless String === @ss.tokenize(o)
Index: ruby_2_1/ext/psych/lib/psych.rb
===================================================================
--- ruby_2_1/ext/psych/lib/psych.rb	(revision 45078)
+++ ruby_2_1/ext/psych/lib/psych.rb	(revision 45079)
@@ -14,6 +14,7 @@ require 'psych/stream' https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/psych/lib/psych.rb#L14
 require 'psych/json/tree_builder'
 require 'psych/json/stream'
 require 'psych/handlers/document_stream'
+require 'psych/class_loader'
 
 ###
 # = Overview
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 45078)
+++ ruby_2_1/version.h	(revision 45079)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.1"
 #define RUBY_RELEASE_DATE "2014-02-21"
-#define RUBY_PATCHLEVEL 43
+#define RUBY_PATCHLEVEL 44
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 2
Index: ruby_2_1/test/psych/test_string.rb
===================================================================
--- ruby_2_1/test/psych/test_string.rb	(revision 45078)
+++ ruby_2_1/test/psych/test_string.rb	(revision 45079)
@@ -15,6 +15,10 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/psych/test_string.rb#L15
       end
     end
 
+    def test_no_doublequotes_with_special_characters
+      assert_equal 2, Psych.dump(%Q{<%= ENV["PATH"] %>}).count('"')
+    end
+
     def test_doublequotes_when_there_is_a_single
       yaml = Psych.dump "@123'abc"
       assert_match(/---\s*"/, yaml)

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44531


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

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