summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index c1e68fb..b357df2 100644
--- a/io.c
+++ b/io.c
@@ -3007,7 +3007,7 @@ rb_f_open(argc, argv)
char *str = StringValuePtr(argv[0]);
if (str[0] == '|') {
- VALUE tmp = rb_str_new(str+1, RSTRING(tmp)->len-1);
+ VALUE tmp = rb_str_new(str+1, RSTRING(str)->len-1);
OBJ_INFECT(tmp, argv[0]);
argv[0] = tmp;
return rb_io_s_popen(argc, argv, rb_cIO);