diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-04 11:08:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-04 11:08:28 +0000 |
commit | 5f13d888cf0aece7c1bb13b72773f66a4b9cebff (patch) | |
tree | 3f6f83022e0f7d352507d7691964d2d47d0bf3f3 /ext | |
parent | 36044b07730033911580501cbe1a060e820e927e (diff) | |
download | ruby-5f13d888cf0aece7c1bb13b72773f66a4b9cebff.tar.gz |
* string.c (rb_str_resize): reverted r28851. rb_str_resize cannot
work before the length is set. [ruby-core:31615]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/bug-3652/bug.c | 16 | ||||
-rw-r--r-- | ext/-test-/bug-3652/extconf.rb | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/ext/-test-/bug-3652/bug.c b/ext/-test-/bug-3652/bug.c deleted file mode 100644 index 290ac2ddee..0000000000 --- a/ext/-test-/bug-3652/bug.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <ruby.h> - -static VALUE -bug_str_resize(VALUE self, VALUE init, VALUE repl) -{ - long initlen = NUM2LONG(init); - VALUE s = rb_str_buf_new(initlen); - return rb_str_resize(s, strlcpy(RSTRING_PTR(s), StringValueCStr(repl), (size_t)initlen)); -} - -void -Init_bug(void) -{ - VALUE mBug = rb_define_module("Bug"); - rb_define_module_function(mBug, "str_resize", bug_str_resize, 2); -} diff --git a/ext/-test-/bug-3652/extconf.rb b/ext/-test-/bug-3652/extconf.rb deleted file mode 100644 index 44f57b41c8..0000000000 --- a/ext/-test-/bug-3652/extconf.rb +++ /dev/null @@ -1 +0,0 @@ -create_makefile("-test-/bug-3652/bug") |