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

ruby-changes:32894

From: nagachika <ko1@a...>
Date: Sat, 15 Feb 2014 23:43:19 +0900 (JST)
Subject: [ruby-changes:32894] nagachika:r44973 (ruby_2_0_0): merge revision(s) r44042, 44045:

nagachika	2014-02-15 23:43:11 +0900 (Sat, 15 Feb 2014)

  New Revision: 44973

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

  Log:
    merge revision(s) r44042,44045:
    
    * test/ruby/test_struct.rb: Add regression test for question marks and
      bangs in struct members. [Closes GH-468]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/ruby/test_struct.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 44972)
+++ ruby_2_0_0/ChangeLog	(revision 44973)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sat Feb 15 23:42:04 2014  Richo Healy  <richo@p...>
+
+	* test/ruby/test_struct.rb: Add regression test for question marks and
+	  bangs in struct members. [Closes GH-468]
+
 Sat Feb 15 23:26:31 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* struct.c (new_struct): fix warning message, class name and encoding.
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44972)
+++ ruby_2_0_0/version.h	(revision 44973)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-02-15"
-#define RUBY_PATCHLEVEL 407
+#define RUBY_PATCHLEVEL 408
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 2
Index: ruby_2_0_0/test/ruby/test_struct.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_struct.rb	(revision 44972)
+++ ruby_2_0_0/test/ruby/test_struct.rb	(revision 44973)
@@ -314,6 +314,18 @@ module TestStruct https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_struct.rb#L314
     assert_include(klass.new.methods.inspect, ':a?', bug9248)
   end
 
+  def test_question_mark_in_member
+    klass = @Struct.new(:a, :b?)
+    o = klass.new("test", true)
+    assert_predicate(o, :b?)
+  end
+
+  def test_bang_mark_in_member
+    klass = @Struct.new(:a, :b!)
+    o = klass.new("test", true)
+    assert_predicate(o, :b!)
+  end
+
   class TopStruct < Test::Unit::TestCase
     include TestStruct
 

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44042,44045


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

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