1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* rational.c (make_patterns): constified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-09 05:39:57 +00:00
parent 6cdc89332e
commit 85976cf893

View file

@ -1287,10 +1287,12 @@ static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore;
static void
make_patterns(void)
{
static char rat_pat_source[] = PATTERN;
static char an_e_pat_source[] = "[eE]";
static char a_dot_pat_source[] = "\\.";
static char underscores_pat_source[] = "_+";
static char const rat_pat_source[] = PATTERN;
static char const an_e_pat_source[] = "[eE]";
static char const a_dot_pat_source[] = "\\.";
static char const underscores_pat_source[] = "_+";
if (rat_pat) return;
rat_pat = rb_reg_new(rat_pat_source, sizeof rat_pat_source - 1, 0);
rb_global_variable(&rat_pat);