ruby-changes:36182
From: nobu <ko1@a...>
Date: Tue, 4 Nov 2014 14:03:57 +0900 (JST)
Subject: [ruby-changes:36182] nobu:r48263 (trunk): * ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: remove
nobu 2014-11-04 14:03:50 +0900 (Tue, 04 Nov 2014) New Revision: 48263 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48263 Log: * ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: remove test for snprintf(3). Modified files: trunk/ext/-test-/printf/printf.c trunk/test/-ext-/test_printf.rb Index: ext/-test-/printf/printf.c =================================================================== --- ext/-test-/printf/printf.c (revision 48262) +++ ext/-test-/printf/printf.c (revision 48263) @@ -2,14 +2,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/printf/printf.c#L2 #include <ruby/encoding.h> static VALUE -printf_test_i(VALUE self, VALUE obj) -{ - char buf[256]; - snprintf(buf, sizeof(buf), "<%"PRIsVALUE">", obj); - return rb_usascii_str_new2(buf); -} - -static VALUE printf_test_s(VALUE self, VALUE obj) { return rb_enc_sprintf(rb_usascii_encoding(), "<%"PRIsVALUE">", obj); @@ -102,7 +94,6 @@ void https://github.com/ruby/ruby/blob/trunk/ext/-test-/printf/printf.c#L94 Init_printf(void) { VALUE m = rb_define_module_under(rb_define_module("Bug"), "Printf"); - rb_define_singleton_method(m, "i", printf_test_i, 1); rb_define_singleton_method(m, "s", printf_test_s, 1); rb_define_singleton_method(m, "v", printf_test_v, 1); rb_define_singleton_method(m, "q", printf_test_q, 1); Index: test/-ext-/test_printf.rb =================================================================== --- test/-ext-/test_printf.rb (revision 48262) +++ test/-ext-/test_printf.rb (revision 48263) @@ -11,10 +11,6 @@ class Test_SPrintf < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/-ext-/test_printf.rb#L11 "<#{self.class}:#{object_id}>" end - def test_int - assert_match(/\A<-?\d+>\z/, Bug::Printf.i(self)) - end - def test_to_str assert_equal("<#{self.class}:#{object_id}>", Bug::Printf.s(self)) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/