redis-rb 4 introduced a breaking change in version 4.0 where redis.client became a CLIENT command to Redis server. This breaks commands_map that sets values on redis.client.command_map, but probably also the whole subscribe_stop function.
An easy fix is to just replace redis.client with redis._client, as I've done here: path-network@fb7e374
According to the redis-rb changelog for 4.0.1 the proper way to replace client usage is to use a new redis.connection function instead.