[#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

rb_io_puts is strange

From: Elliott Hughes <ehughes@...>
Date: 2004-02-03 20:03:20 UTC
List: ruby-core #2335
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.

shouldn't

        if (RSTRING(line)->len == 0 ||
            RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') {
            rb_io_write(out, rb_default_rs);
        }

just be

        rb_io_write(out, rb_default_rs);

?

Java's print and println have an obvious, consistent relationship. Ruby's
print and puts don't.

 --elliott



*********************************************************************
This e-mail and any attachment is confidential. It may only be read, copied and used by the intended recipient(s). If you are not the intended recipient(s), you may not copy, use, distribute, forward, store or disclose this e-mail or any attachment. If you are not the intended recipient(s) or have otherwise received this e-mail in error, you should destroy it and any attachment and notify the sender by reply e-mail or send a message to sysadmin@bluearc.com
*********************************************************************


In This Thread

Prev Next