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

ruby-changes:39237

From: hsbt <ko1@a...>
Date: Tue, 21 Jul 2015 20:32:51 +0900 (JST)
Subject: [ruby-changes:39237] hsbt:r51318 (trunk): * test/ruby/test_range.rb: Add test for Range#hash

hsbt	2015-07-21 20:32:38 +0900 (Tue, 21 Jul 2015)

  New Revision: 51318

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

  Log:
    * test/ruby/test_range.rb: Add test for Range#hash
      [fix GH-969] Patch by @yui-knk

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_range.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51317)
+++ ChangeLog	(revision 51318)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul 21 20:32:33 2015  SHIBATA Hiroshi  <hsbt@r...>
+
+	* test/ruby/test_range.rb: Add test for Range#hash
+	  [fix GH-969] Patch by @yui-knk
+
 Tue Jul 21 19:43:20 2015  Koichi Sasada  <ko1@a...>
 
 	* compile.c: constify the first parameter (iseq).
Index: test/ruby/test_range.rb
===================================================================
--- test/ruby/test_range.rb	(revision 51317)
+++ test/ruby/test_range.rb	(revision 51318)
@@ -138,6 +138,8 @@ class TestRange < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_range.rb#L138
 
   def test_hash
     assert_kind_of(Fixnum, (0..1).hash)
+    assert_equal((0..1).hash, (0..1).hash)
+    assert_not_equal((0..1).hash, (0...1).hash)
   end
 
   def test_step

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

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