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

ruby-changes:26308

From: usa <ko1@a...>
Date: Thu, 13 Dec 2012 14:24:39 +0900 (JST)
Subject: [ruby-changes:26308] usa:r38359 (ruby_1_9_3): reverted r38318.

usa	2012-12-13 14:24:26 +0900 (Thu, 13 Dec 2012)

  New Revision: 38359

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

  Log:
    reverted r38318.
    rubyspec reports that there is incompatibility.

  Modified directories:
    branches/ruby_1_9_3/
  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/lib/erb.rb
    branches/ruby_1_9_3/test/erb/test_erb.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 38358)
+++ ruby_1_9_3/ChangeLog	(revision 38359)
@@ -30,11 +30,6 @@ Tue Dec 11 19:15:51 2012  Nobuyoshi Naka https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L30
 	* parse.y (parser_here_document): flush string content between new
 	  line and :string_embexpr.  [ruby-core:48703] [Bug #7255]
 
-Tue Dec 11 19:01:45 2012  Nobuyoshi Nakada  <nobu@r...>
-
-	* lib/erb.rb (ERB#run, ERB#result): eval under isolated bindings for
-	  safe concurrent use.  [ruby-core:47638] [Bug #7046]
-
 Tue Dec 11 17:53:55 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_compile_each): count flip-flop state in local iseq
Index: ruby_1_9_3/lib/erb.rb
===================================================================
--- ruby_1_9_3/lib/erb.rb	(revision 38358)
+++ ruby_1_9_3/lib/erb.rb	(revision 38359)
@@ -1,4 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/erb.rb#L1
-# -*- coding: us-ascii -*-
 # = ERB -- Ruby Templating
 #
 # Author:: Masatoshi SEKI
@@ -817,7 +816,7 @@ class ERB https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/erb.rb#L816
   end
 
   # Generate results and print them. (see ERB#result)
-  def run(b=new_toplevel)
+  def run(b=TOPLEVEL_BINDING)
     print self.result(b)
   end
 
@@ -829,7 +828,7 @@ class ERB https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/erb.rb#L828
   # _b_ accepts a Binding or Proc object which is used to set the context of
   # code evaluation.
   #
-  def result(b=new_toplevel)
+  def result(b=TOPLEVEL_BINDING)
     if @safe_level
       proc {
         $SAFE = @safe_level
@@ -840,12 +839,6 @@ class ERB https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/erb.rb#L839
     end
   end
 
-  def new_toplevel
-    # New binding each time *near* toplevel for unspecified runs
-    TOPLEVEL_BINDING.dup
-  end
-  private :new_toplevel
-
   # Define _methodname_ as instance method of _mod_ from compiled ruby source.
   #
   # example:
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 38358)
+++ ruby_1_9_3/version.h	(revision 38359)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 340
+#define RUBY_PATCHLEVEL 341
 
-#define RUBY_RELEASE_DATE "2012-12-11"
+#define RUBY_RELEASE_DATE "2012-12-13"
 #define RUBY_RELEASE_YEAR 2012
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 11
+#define RUBY_RELEASE_DAY 13
 
 #include "ruby/version.h"
 
Index: ruby_1_9_3/test/erb/test_erb.rb
===================================================================
--- ruby_1_9_3/test/erb/test_erb.rb	(revision 38358)
+++ ruby_1_9_3/test/erb/test_erb.rb	(revision 38359)
@@ -1,4 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/erb/test_erb.rb#L1
-# -*- coding: us-ascii -*-
 require 'test/unit'
 require 'erb'
 
@@ -38,15 +37,6 @@ class TestERB < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/erb/test_erb.rb#L37
     }
     assert_match(/\Atest filename:1\b/, e.backtrace[0])
   end
-
-  def test_concurrent_default_binding
-    template1 = 'one <%= ERB.new(template2).result %>'
-
-    eval 'template2 = "two"', TOPLEVEL_BINDING
-
-    bug7046 = '[ruby-core:47638]'
-    assert_equal("one two", ERB.new(template1).result, bug7046)
-  end
 end
 
 class TestERBCore < Test::Unit::TestCase

Property changes on: ruby_1_9_3
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /trunk:r37594


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

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