Sha256: 9baeffb8b143ccfe32ddb6650b4438acbbf944f9b01f16e9f8387029c013d6f1
Contents?: true
Size: 842 Bytes
Versions: 1
Compression:
Stored size: 842 Bytes
Contents
module Polyfill module V2_4 module IO module Instance module Readline module Method def readline(*args) hash, others = args.partition { |arg| arg.is_a?(::Hash) } input = super(*others) if hash[0] && hash[0][:chomp] separator = others.find { |other| other.respond_to?(:to_str) } if separator input.chomp!(separator) else input.chomp! end end input end end if RUBY_VERSION < '2.4.0' refine ::IO do include Method end def self.included(base) base.include Method end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
polyfill-0.3.0 | lib/polyfill/v2_4/io/instance/readline.rb |