* string.c (rb_str_squeeze_bang): initialize squeezing table if no
arguments given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c23d672932
commit
03d68e3ba4
@ -1,3 +1,8 @@
|
|||||||
|
Fri Nov 9 15:20:13 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_squeeze_bang): initialize squeezing table if no
|
||||||
|
arguments given.
|
||||||
|
|
||||||
Fri Nov 9 13:57:50 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Nov 9 13:57:50 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* enum.c (each_with_index_i): use rb_yield_values() for
|
* enum.c (each_with_index_i): use rb_yield_values() for
|
||||||
|
3
string.c
3
string.c
@ -3591,7 +3591,7 @@ tr_setup_table(VALUE str, char stable[256], int first,
|
|||||||
char buf[256];
|
char buf[256];
|
||||||
struct tr tr;
|
struct tr tr;
|
||||||
int c;
|
int c;
|
||||||
VALUE table = 0, ptable;
|
VALUE table = 0, ptable = 0;
|
||||||
int i, cflag = 0;
|
int i, cflag = 0;
|
||||||
|
|
||||||
tr.p = RSTRING_PTR(str); tr.pend = tr.p + RSTRING_LEN(str);
|
tr.p = RSTRING_PTR(str); tr.pend = tr.p + RSTRING_LEN(str);
|
||||||
@ -3752,6 +3752,7 @@ rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
|
memset(squeez, 1, sizeof(squeez));
|
||||||
enc = rb_enc_get(str);
|
enc = rb_enc_get(str);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user