summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-12-01 01:31:24 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-12-01 02:38:51 +0900
commitab4c7077cc44cd6725625562b7380a44cf462190 (patch)
tree29c92f2b67fad0b7378de21bc66a34c4b33361c5 /io.c
parentf0c9d2a0c801569725459420acefc8d983bbf307 (diff)
downloadruby-ab4c7077cc44cd6725625562b7380a44cf462190.tar.gz
Prevent segfault in String#scan with ObjectSpace.each_object
Calling `String#scan` without a block creates an incomplete MatchData object whose `RMATCH(match)->str` is Qfalse. Usually this object is not leaked, but it was possible to pull it by using ObjectSpace.each_object. This change hides the internal MatchData object by using rb_obj_hide. Fixes [Bug #19159]
Diffstat (limited to 'io.c')
0 files changed, 0 insertions, 0 deletions