summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-23 10:40:43 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-23 10:40:43 +0000
commit1f8e38befa8e9aef05e4aaa14f464c1754f40cd7 (patch)
tree8f5738867ba6c700e284ac6cd45e84b385c22291 /object.c
parentfd1d8cdc09ed86e4a0812120a17ff0d7b04adcaf (diff)
This commit was manufactured by cvs2svn to create tag 'v1_1b6'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_1b6@52 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/object.c b/object.c
index 2e614b3a41..b515b45202 100644
--- a/object.c
+++ b/object.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Jul 15 12:01:24 JST 1993
- Copyright (C) 1993-1996 Yukihiro Matsumoto
+ Copyright (C) 1993-1998 Yukihiro Matsumoto
************************************************/
@@ -386,7 +386,7 @@ static VALUE
mod_to_s(class)
VALUE class;
{
- return rb_class_path(class);
+ return str_dup(rb_class_path(class));
}
static VALUE
@@ -721,6 +721,15 @@ f_string(obj, arg)
return rb_funcall(arg, rb_intern("to_s"), 0);
}
+char*
+str2cstr(str)
+ VALUE str;
+{
+ if (NIL_P(str)) return NULL;
+ Check_Type(str, T_STRING);
+ return RSTRING(str)->ptr;
+}
+
VALUE
rb_String(val)
VALUE val;