summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-28 14:51:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-28 14:51:23 +0000
commit4d961eb8a603bf3020836d6be661bc17c0b79321 (patch)
tree3d97045d638e6a23dbff2ccdfa50ea14ac05a6cc /parse.y
parent1e8e70a311bca1533a5196f4a3f685cf1b7a34bf (diff)
* parse.y (rb_id2str, ripper_initialize, Init_ripper): use rb_usascii_str_new2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index b12a0f968a..a6fed50670 100644
--- a/parse.y
+++ b/parse.y
@@ -9076,7 +9076,7 @@ rb_id2str(ID id)
if (op_tbl[i].token == id) {
VALUE str = global_symbols.op_sym[i];
if (!str) {
- str = rb_str_new2(op_tbl[i].name);
+ str = rb_usascii_str_new2(op_tbl[i].name);
OBJ_FREEZE(str);
global_symbols.op_sym[i] = str;
}
@@ -9728,7 +9728,7 @@ ripper_initialize(int argc, VALUE *argv, VALUE self)
}
else {
StringValue(fname);
- fname2 = rb_str_new2(" ");
+ fname2 = rb_usascii_str_new2(" ");
rb_str_append(fname2, fname);
}
parser_initialize(parser);
@@ -9864,7 +9864,7 @@ Init_ripper(void)
VALUE Ripper;
Ripper = rb_define_class("Ripper", rb_cObject);
- rb_define_const(Ripper, "Version", rb_str_new2(RIPPER_VERSION));
+ rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
rb_define_alloc_func(Ripper, ripper_s_allocate);
rb_define_method(Ripper, "initialize", ripper_initialize, -1);
rb_define_method(Ripper, "parse", ripper_parse, 0);