[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: rb_io_puts is strange

From: Mathieu Bouchard <matju@...>
Date: 2004-02-05 19:31:53 UTC
List: ruby-core #2345
On Wed, 4 Feb 2004, Elliott Hughes wrote:

> [re: puts behaving differently depending on the final character of the
> string it's outputting]
> > It's the feature.
> Being documented doesn't stop it being a bad idea, though!

Here's probably what you want:

class IO
  def println(*a)
    a.each {|x| print x,"\n" }
    nil
  end
end
module Kernel
  def println(*a)
    $defout.println(*a)
  end
end

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju



In This Thread

Prev Next