This issue was solved with changeset r40065.
Zachary, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
lib/securerandom.rb: Don't use Array#to_s. [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott).