summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-20 07:36:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-20 07:36:01 +0000
commitc8c55db68ae5d78d6926b160f5472712cf68993f (patch)
tree7c38bc0ddd8cb0b16d2f0bca9075afb8f8034d51 /re.c
parente0c5eed65c3b6c4cfb2a922286b1be792ddac58b (diff)
* io.c (rb_io_putc): output via rb_io_write().
* re.c (rb_reg_initialize_m): frozen check should be moved here from rb_reg_initialize(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/re.c b/re.c
index 94cefa4..1dc4152 100644
--- a/re.c
+++ b/re.c
@@ -959,9 +959,6 @@ rb_reg_initialize(obj, s, len, options)
{
struct RRegexp *re = RREGEXP(obj);
- if (OBJ_FROZEN(obj)) {
- rb_error_frozen("Regexp");
- }
if (re->ptr) re_free_pattern(re->ptr);
if (re->str) free(re->str);
re->ptr = 0;
@@ -1161,6 +1158,9 @@ rb_reg_initialize_m(argc, argv, self)
}
}
+ if (OBJ_FROZEN(self)) {
+ rb_error_frozen("Regexp");
+ }
src = argv[0];
if (TYPE(src) == T_REGEXP) {
rb_reg_check(src);