summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r--ext/strscan/strscan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index fb61ee07d2..5c30c3cc4b 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -747,8 +747,7 @@ Init_strscan()
rb_obj_freeze(tmp);
rb_const_set(StringScanner, rb_intern("Id"), tmp);
- rb_define_singleton_method(StringScanner, "allocate",
- strscan_s_allocate, 0);
+ rb_define_alloc_func(StringScanner, strscan_s_allocate);
rb_define_private_method(StringScanner, "initialize",
strscan_initialize, -1);
rb_define_singleton_method(StringScanner, "must_C_version",