mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	erb: suppress warnings
* bin/erb (ERB::Main#run): get rid of shadowing outer local variables. [ruby-core:65772] [Feature #10395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									1137a46a81
								
							
						
					
					
						commit
						8326a747f9
					
				
					 3 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Sat Dec 13 04:59:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* bin/erb (ERB::Main#run): get rid of shadowing outer local
 | 
			
		||||
	  variables.  [ruby-core:65772] [Feature #10395]
 | 
			
		||||
 | 
			
		||||
Fri Dec 12 21:56:44 2014  Kouhei Sutou  <kou@cozmixng.org>
 | 
			
		||||
 | 
			
		||||
	* gems/bundled_gems: Upgrade to test-unit 3.0.8. assert_throw and
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								bin/erb
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								bin/erb
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -141,7 +141,7 @@ EOU
 | 
			
		|||
        bind = TOPLEVEL_BINDING.taint
 | 
			
		||||
        if variables
 | 
			
		||||
          enc = erb.encoding
 | 
			
		||||
          variables.each do |var, val|
 | 
			
		||||
          for var, val in variables do
 | 
			
		||||
            val = val.encode(enc) if val
 | 
			
		||||
            bind.local_variable_set(var, val)
 | 
			
		||||
          end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,8 @@ require 'test/unit'
 | 
			
		|||
 | 
			
		||||
class TestErbCommand < Test::Unit::TestCase
 | 
			
		||||
  def test_var
 | 
			
		||||
    assert_in_out_err([File.expand_path("../../../bin/erb", __FILE__),
 | 
			
		||||
    assert_in_out_err(["-w",
 | 
			
		||||
                       File.expand_path("../../../bin/erb", __FILE__),
 | 
			
		||||
                       "var=hoge"],
 | 
			
		||||
                      "<%=var%>", ["hoge"])
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue