summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'range.c')
-rw-r--r--range.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/range.c b/range.c
index 84a2dcc6790..68264992f37 100644
--- a/range.c
+++ b/range.c
@@ -80,6 +80,7 @@ rb_range_new(VALUE beg, VALUE end, int exclude_end)
static void
range_modify(VALUE range)
{
+ rb_check_frozen(range);
/* Ranges are immutable, so that they should be initialized only once. */
if (RANGE_EXCL(range) != Qnil) {
rb_name_err_raise("`initialize' called twice", range, ID2SYM(idInitialize));