Skip to content

Commit

Permalink
Symbol#dup raises a TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jun 22, 2012
1 parent 3a8540a commit 3146804
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NSString.m
Expand Up @@ -55,6 +55,10 @@
static id
nsstr_dup(id rcv, SEL sel)
{
if (TYPE(rcv) == T_SYMBOL) {
rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname((VALUE)rcv));
}

id dup = (id)str_new_from_cfstring((CFStringRef)rcv);
if (OBJ_TAINTED(rcv)) {
OBJ_TAINT(dup);
Expand Down
1 change: 0 additions & 1 deletion spec/frozen/tags/macruby/core/object/dup_tags.txt

This file was deleted.

0 comments on commit 3146804

Please sign in to comment.