summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-30 07:08:56 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-30 07:08:56 +0000
commit029e9449ce7fa4710eac7a66e605afb3dc8a99ce (patch)
tree720de2cc507ec208d7390899d757cf7d45d4ddbb
parentc9b177327d20863d67120eb884d2ac56d0a1dbd2 (diff)
* ruby.c (proc_options): -F set compiled regular expression to $;.
[ruby-talk:77381] * string.c (Init_String): no setter type check for $; git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--ruby.c2
-rw-r--r--string.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cec6459..9f51732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,13 @@ Wed Jul 30 15:54:04 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): should initialize
instance variables. [ruby-talk:77362]
+Wed Jul 30 15:39:54 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ruby.c (proc_options): -F set compiled regular expression to $;.
+ [ruby-talk:77381]
+
+ * string.c (Init_String): no setter type check for $;
+
Wed Jul 30 15:10:02 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* error.c (rb_raise): snprintf() termination moved to
diff --git a/ruby.c b/ruby.c
index 3975580..344007b 100644
--- a/ruby.c
+++ b/ruby.c
@@ -589,7 +589,7 @@ proc_options(argc, argv)
case 'F':
if (*++s) {
- rb_fs = rb_str_new2(s);
+ rb_fs = rb_reg_new(s, strlen(s), 0);
}
break;
diff --git a/string.c b/string.c
index 9d3da92..ae157f4 100644
--- a/string.c
+++ b/string.c
@@ -3402,6 +3402,6 @@ Init_String()
id_to_s = rb_intern("to_s");
rb_fs = Qnil;
- rb_define_hooked_variable("$;", &rb_fs, 0, rb_str_setter);
- rb_define_hooked_variable("$-F", &rb_fs, 0, rb_str_setter);
+ rb_define_variable("$;", &rb_fs);
+ rb_define_variable("$-F", &rb_fs);
}