[#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: Exception not caught / require BUG

From: ts <decoux@...>
Date: 2004-02-21 16:26:33 UTC
List: ruby-core #2492
>>>>> "L" == Lothar Scholz <mailinglists@scriptolutions.com> writes:

L> I found that the following exception does not raise an exception
L> but kills the ruby interpreter.

 normal, LoadError don't inherit from StandardError

svg% ruby -e 'p LoadError < StandardError'
false
svg% 

svg% ruby -e 'p LoadError < ScriptError'
true
svg% 

L> def test_traceback()
L> begin
L>   require "Socket"
L> rescue => detail
L>   print "Not available"
L> end
L> end

 Your rescue is for StandardError only

L> c:/ruby/lib/ruby/1.8/i386-mswin32/Socket.so: 127: The specified
L> procedure could not be found.   - Init_Socket (LoadError) 
L> c:/ruby/lib/ruby/1.8/i386-mswin32/Socket.so     from
L> common/ruby/arachno_traceback.rb:25:in `test_traceback' 
L>         from common/ruby/arachno_traceback.rb:45

L> But since the file does not exist the error message about a not found
L> procedure is also wrong.

 You probably work with a system which don't make the difference between
 the file Socket.so and socket.so and the error is right

 Init_Socket is not defined in socket.so


Guy Decoux



In This Thread

Prev Next