mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Update to ruby/spec@7de852d
This commit is contained in:
		
							parent
							
								
									994833085a
								
							
						
					
					
						commit
						79671ec57e
					
				
					 135 changed files with 4415 additions and 4885 deletions
				
			
		|  | @ -36,22 +36,20 @@ describe "String#bytes" do | |||
|   end | ||||
| end | ||||
| 
 | ||||
| with_feature :encoding do | ||||
|   describe "String#bytes" do | ||||
|     before :each do | ||||
|       @utf8 = "東京" | ||||
|       @ascii = 'Tokyo' | ||||
|       @utf8_ascii = @utf8 + @ascii | ||||
|     end | ||||
| describe "String#bytes" do | ||||
|   before :each do | ||||
|     @utf8 = "東京" | ||||
|     @ascii = 'Tokyo' | ||||
|     @utf8_ascii = @utf8 + @ascii | ||||
|   end | ||||
| 
 | ||||
|     it "agrees with #getbyte" do | ||||
|       @utf8_ascii.bytes.to_a.each_with_index do |byte,index| | ||||
|         byte.should == @utf8_ascii.getbyte(index) | ||||
|       end | ||||
|     end | ||||
| 
 | ||||
|     it "is unaffected by #force_encoding" do | ||||
|       @utf8.force_encoding('ASCII').bytes.to_a.should == @utf8.bytes.to_a | ||||
|   it "agrees with #getbyte" do | ||||
|     @utf8_ascii.bytes.to_a.each_with_index do |byte,index| | ||||
|       byte.should == @utf8_ascii.getbyte(index) | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   it "is unaffected by #force_encoding" do | ||||
|     @utf8.force_encoding('ASCII').bytes.to_a.should == @utf8.bytes.to_a | ||||
|   end | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benoit Daloze
						Benoit Daloze