Project

General

Profile

Actions

Backport #7925

closed

refine bug with puts

Added by marcandre (Marc-Andre Lafortune) about 11 years ago. Updated about 11 years ago.


Description

As reported by Dave Thomas in [ruby-core:52515]

module VanityPuts
  refine Object do
    private
    def puts(*args)
      args.each do |arg|
        super("Dave says: #{arg}")
      end
    end
  end
end

using VanityPuts

puts "Hello" # => SystemStackError, expected "Dave says: Hello"
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0