summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/string.c b/string.c
index 9137b0fc55..b5f44b9d8b 100644
--- a/string.c
+++ b/string.c
@@ -174,6 +174,16 @@ rb_str_associate(str, add)
rb_ary_push(RSTRING(str)->orig, add);
}
+VALUE
+rb_str_associated(str)
+ VALUE str;
+{
+ if (!FL_TEST(str, STR_NO_ORIG)) {
+ return Qfalse;
+ }
+ return RSTRING(str)->orig;
+}
+
static ID to_str;
VALUE