mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
Attempt to use independent strings for destructive tests that directly modify values on memory by using Fiddle::Pointer. [Bug #12537] [ruby-dev:49700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									14d9ceed15
								
							
						
					
					
						commit
						053c1e08e3
					
				
					 2 changed files with 10 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
Fri Jul  1 19:38:57 2016  Naohisa Goto  <ngotogenome@gmail.com>
 | 
			
		||||
 | 
			
		||||
	* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
 | 
			
		||||
	  Attempt to use independent strings for destructive tests that
 | 
			
		||||
	  directly modify values on memory by using Fiddle::Pointer.
 | 
			
		||||
	  [Bug #12537] [ruby-dev:49700]
 | 
			
		||||
 | 
			
		||||
Fri Jul  1 18:20:00 2016  NARUSE, Yui  <naruse@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* .gdbinit (rb_ps_thread): show the detail of cfunc in ruby level
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@ module Fiddle
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    def test_to_str
 | 
			
		||||
      str = "hello world"
 | 
			
		||||
      str = Marshal.load(Marshal.dump("hello world"))
 | 
			
		||||
      ptr = Pointer[str]
 | 
			
		||||
 | 
			
		||||
      assert_equal 3, ptr.to_str(3).length
 | 
			
		||||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ module Fiddle
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    def test_to_s
 | 
			
		||||
      str = "hello world"
 | 
			
		||||
      str = Marshal.load(Marshal.dump("hello world"))
 | 
			
		||||
      ptr = Pointer[str]
 | 
			
		||||
 | 
			
		||||
      assert_equal 3, ptr.to_s(3).length
 | 
			
		||||
| 
						 | 
				
			
			@ -202,7 +202,7 @@ module Fiddle
 | 
			
		|||
        assert_equal(str[0].ord, ptr[0])
 | 
			
		||||
        assert_equal(str[1].ord, ptr[1])
 | 
			
		||||
      }
 | 
			
		||||
      str = 'abc'
 | 
			
		||||
      str = Marshal.load(Marshal.dump('abc'))
 | 
			
		||||
      ptr = Pointer[str]
 | 
			
		||||
      check.call(str, ptr)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue