mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* parse.y (parser_tokadd_string, parser_yylex): insert a backslash
if the next character is non-ascii. [ruby-dev:45278] [Bug #6069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									455c23fa01
								
							
						
					
					
						commit
						45c6daeed7
					
				
					 3 changed files with 14 additions and 4 deletions
				
			
		|  | @ -74,12 +74,13 @@ class TestRubyLiteral < Test::Unit::TestCase | |||
|         end | ||||
|       end | ||||
|     end | ||||
|     bug6069 = '[ruby-dev:45278]' | ||||
|     assert_equal "\x13", "\c\x33" | ||||
|     assert_equal "\x13", "\C-\x33" | ||||
|     assert_equal "\xB3", "\M-\x33" | ||||
|     assert_equal "\u201c", eval(%["\\\u{201c}"]), bug5262 | ||||
|     assert_equal "\u201c".encode("euc-jp"), eval(%["\\\u{201c}"].encode("euc-jp")), bug5262 | ||||
|     assert_equal "\u201c".encode("iso-8859-13"), eval(%["\\\u{201c}"].encode("iso-8859-13")), bug5262 | ||||
|     assert_equal "\\\u201c", eval(%["\\\u{201c}"]), bug6069 | ||||
|     assert_equal "\\\u201c".encode("euc-jp"), eval(%["\\\u{201c}"].encode("euc-jp")), bug6069 | ||||
|     assert_equal "\\\u201c".encode("iso-8859-13"), eval(%["\\\u{201c}"].encode("iso-8859-13")), bug6069 | ||||
|   end | ||||
| 
 | ||||
|   def test_dstring | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu