[#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: nobu.nokada@...
Date: 2004-02-03 23:30:02 UTC
List: ruby-core #2337
Hi,

At Wed, 4 Feb 2004 05:03:20 +0900,
Elliott Hughes wrote:
> i just tracked down some incorrect behavior (missing newlines in the output)
> in a Ruby script to the fact that there's some weird code in IO.puts; if the
> string you're writing ends in '\n', puts behaves like print.

It's the feature.

---------------------------------------------------------------- IO#puts
     ios.puts(obj, ...)    => nil
------------------------------------------------------------------------
     Writes the given objects to _ios_ as with +IO#print+. Writes a
     record separator (typically a newline) after any that do not
                                                           ~~~~~~
     already end with a newline sequence. If called with an array
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     argument, writes each element on a new line. If called without
     arguments, outputs a single record separator.

-- 
Nobu Nakada

In This Thread

Prev Next