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

ruby-changes:42334

From: naruse <ko1@a...>
Date: Tue, 29 Mar 2016 23:59:35 +0900 (JST)
Subject: [ruby-changes:42334] naruse:r54408 (ruby_2_3): merge revision(s) 53875: [Backport #12089]

naruse	2016-03-29 23:59:32 +0900 (Tue, 29 Mar 2016)

  New Revision: 54408

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

  Log:
    merge revision(s) 53875: [Backport #12089]
    
    * object.c (rb_mod_const_get): make error message at uninterned
      string consistent with symbols.  [ruby-dev:49498] [Bug #12089]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/object.c
    branches/ruby_2_3/test/-ext-/symbol/test_inadvertent_creation.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 54407)
+++ ruby_2_3/ChangeLog	(revision 54408)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Tue Mar 29 23:54:31 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* object.c (rb_mod_const_get): make error message at uninterned
+	  string consistent with symbols.  [ruby-dev:49498] [Bug #12089]
+
 Tue Mar 29 23:45:24 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* dir.c (push_pattern, push_glob): deal with read paths as UTF-8
Index: ruby_2_3/test/-ext-/symbol/test_inadvertent_creation.rb
===================================================================
--- ruby_2_3/test/-ext-/symbol/test_inadvertent_creation.rb	(revision 54407)
+++ ruby_2_3/test/-ext-/symbol/test_inadvertent_creation.rb	(revision 54408)
@@ -54,6 +54,14 @@ module Test_Symbol https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/-ext-/symbol/test_inadvertent_creation.rb#L54
       assert_not_interned_error(cl, :const_get, name.to_sym)
     end
 
+    def test_module_const_get_toplevel
+      bug12089 = '[ruby-dev:49498] [Bug #12089]'
+      name = noninterned_name("A")
+      e = assert_not_interned_error(Object, :const_get, name)
+      assert_equal(name, e.name)
+      assert_not_match(/Object::/, e.message, bug12089)
+    end
+
     def test_module_const_defined?
       cl = Class.new
       name = noninterned_name("A")
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 54407)
+++ ruby_2_3/version.h	(revision 54408)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.0"
 #define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 56
+#define RUBY_PATCHLEVEL 57
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_3/object.c
===================================================================
--- ruby_2_3/object.c	(revision 54407)
+++ ruby_2_3/object.c	(revision 54408)
@@ -2142,7 +2142,7 @@ rb_mod_const_get(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/ruby_2_3/object.c#L2142
 		continue;
 	    }
 	    else {
-		rb_name_err_raise("uninitialized constant %2$s::%1$s", mod, part);
+		rb_mod_const_missing(mod, part);
 	    }
 	}
 	if (!rb_is_const_id(id)) {

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r53875


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

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