From f77c97a8ca966ba2a0303b838fa7e04ebc311ecb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 29 Nov 2012 08:45:13 +0000 Subject: variable.c: show namespace * variable.c (rb_const_set): show namespace in warning messages. [Feature #7190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_const.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_const.rb b/test/ruby/test_const.rb index 31adb2a0ce..dab45b7e08 100644 --- a/test/ruby/test_const.rb +++ b/test/ruby/test_const.rb @@ -1,3 +1,4 @@ +# -*- coding: us-ascii -*- require 'test/unit' class TestConst < Test::Unit::TestCase @@ -50,7 +51,7 @@ class TestConst < Test::Unit::TestCase c = Class.new c.const_set(:X, 1) assert_output(nil, <<-WARNING) {c.const_set(:X, 2)} -#{__FILE__}:#{__LINE__-1}: warning: already initialized constant X +#{__FILE__}:#{__LINE__-1}: warning: already initialized constant #{c}::X #{__FILE__}:#{__LINE__-3}: warning: previous definition of X was here WARNING end -- cgit v1.2.3