summaryrefslogtreecommitdiff
path: root/ext/-test-/string
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-17 03:55:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-17 03:55:53 +0000
commit684fe92dcc0efcf0f1da636c5a6ab52c1602b337 (patch)
tree4cbdf9ade8f85a8a577a413dccb102c6d52a3326 /ext/-test-/string
parentb3626b3ee7d814e23016a4c639aa05e51fea5a8b (diff)
nofree.c: Bug::String.nofree
* ext/-test-/string/nofree.c: new method for test of r50334. [ruby-core:68436] [Bug #10942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-/string')
-rw-r--r--ext/-test-/string/nofree.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/-test-/string/nofree.c b/ext/-test-/string/nofree.c
new file mode 100644
index 0000000..d3d8071
--- /dev/null
+++ b/ext/-test-/string/nofree.c
@@ -0,0 +1,13 @@
+#include "ruby.h"
+
+VALUE
+bug_str_nofree(VALUE self)
+{
+ return rb_str_new_cstr("abcdef");
+}
+
+void
+Init_nofree(VALUE klass)
+{
+ rb_define_singleton_method(klass, "nofree", bug_str_nofree, 0);
+}