[#28395] [Bug #2830] Some methods raise ArgumentError instead of TypeError — Marc-Andre Lafortune <redmine@...>
Bug #2830: Some methods raise ArgumentError instead of TypeError
[#28405] [Feature #2832] Vector#each and Enumerable — Marc-Andre Lafortune <redmine@...>
Feature #2832: Vector#each and Enumerable
[#28452] Watched issues on redmine — Caleb Clausen <vikkous@...>
Is there a page on redmine that will show me the list of issues that
[#28482] Question on scoped constant resolution Class vs Module — Peter McLain <peter.mclain@...>
I asked this on ruby-talk, but didn't get anywhere. Someone suggested
[#28505] [Bug #2838] Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour — P K <redmine@...>
Bug #2838: Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour
[#28552] [Bug #2945] Regexp#=== is failed by an exception when the exception is occurred in method_missing — Kenta Murata <redmine@...>
Bug #2945: Regexp#=== is failed by an exception when the exception is occurred in method_missing
Hi,
Hi,
Hi,
Hi,
[#28561] Ruby::DL vs Ruby::FFI — Aston <blackapache512-ticket@...>
Ruby.DL and FFI libraries are great for programmers like me who are not internet programmers, but are more interested in scientific and number processing etc.
On Mon, Mar 8, 2010 at 4:56 PM, Aston <blackapache512-ticket@yahoo.com> wrote:
[#28576] "rake not found" error on a rubygems test — Yusuke ENDOH <mame@...>
Hi Eric Hodel,
[#28583] build failure on 26861 using msys/mingw — Jon <jon.forums@...>
Can anyone replicate? I've recently updated both binutils and the mingw runtime so this may very well be my configuration.
[#28602] [Bug #2952] Time.strftime format %N — Russell Penney <redmine@...>
Bug #2952: Time.strftime format %N
[#28643] [Bug #2957] IO.print emits field separator after each object, rather than between — Daniel Kelley <redmine@...>
Bug #2957: IO.print emits field separator after each object, rather than between
[#28665] [ANN] 1.9.2 release plan — Yusuke ENDOH <mame@...>
Hi,
[#28686] trunk (26947) build fail with msys/mingw/vista — Jon <jon.forums@...>
I get the following build failure when msysgit's "c:\git\cmd" dir is on PATH.
On Tue, Mar 16, 2010 at 5:50 AM, Jon <jon.forums@gmail.com> wrote:
[#28712] When a trace hook raises an exception, should it terminate the program? — Rocky Bernstein <rockyb@...>
In Ruby 1.8 and the Ruby 1.9 trunk when running a trace hook that raises an
On Wed, Mar 17, 2010 at 5:42 AM, Rocky Bernstein <rockyb@rubyforge.org> wrote:
Let me clarify a bit because I think some of the facts (some by me) may have
On Thu, Mar 18, 2010 at 5:52 AM, Rocky Bernstein <rockyb@rubyforge.org> wrote:
[#28724] [Feature:trunk] Array#repeated_(permutation|combination) — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
New methods Array#repeated_(permutation|combination).
[#28735] [Bug #2982] Ruby tries to link with both openssl and readline — Lucas Nussbaum <redmine@...>
Bug #2982: Ruby tries to link with both openssl and readline
Issue #2982 has been updated by caleb clausen.
Hi,
[#28783] [Feature #2065] An ancestors iterator — Simon Chiang <redmine@...>
Issue #2065 has been updated by Simon Chiang.
Hi,
[#28837] [Bug #2993] Module#instance_methods' flag seems to be ignored in singleton classes — Xavier Noria <redmine@...>
Bug #2993: Module#instance_methods' flag seems to be ignored in singleton classes
[#28859] st.c: pool allocator for tables and entries — Eric Wong <normalperson@...>
Hi all,
[#28865] Can DRb be used across a fork() — Chris Schlaeger <cschlaeger@...>
I'm trying to use DRb to communicate between a parent and child
[#28871] WeakRef extending Delegator is a bug waiting to happen? — Charles Oliver Nutter <headius@...>
Hopefully this doesn't contradict my other email too much :)
[#28902] [Bug #2998] gets fails in mingw — Roger Pack <redmine@...>
Bug #2998: gets fails in mingw
[#28907] [Bug #3000] Open SSL Segfaults — Christian Höltje <redmine@...>
Bug #3000: Open SSL Segfaults
Issue #3000 has been updated by Hiroshi NAKAMURA.
Hi,
Hi,
Hi,
[#28924] [Bug #3005] Ruby core dump - [BUG] rb_sys_fail() - errno == 0 — Sebastian YEPES <redmine@...>
Bug #3005: Ruby core dump - [BUG] rb_sys_fail() - errno == 0
[#28954] [Feature #3010] slow require gems in ruby 1.9.1 — Miao Jiang <redmine@...>
Feature #3010: slow require gems in ruby 1.9.1
[#29019] [Bug #3015] NetBSD vs test/dl — Michael Graff <redmine@...>
Bug #3015: NetBSD vs test/dl
On Fri, Mar 26, 2010 at 11:49:59AM +0900, Michael Graff wrote:
[#29031] [Feature #1395](Open) Steppable Kernel::eval — Yusuke Endoh <redmine@...>
Issue #1395 has been updated by Yusuke Endoh.
[#29045] [Feature #3021] Array#product should accept a block. — Marc-Andre Lafortune <redmine@...>
Feature #3021: Array#product should accept a block.
[#29092] merged psych to trunk — Aaron Patterson <aaron@...>
Hey everyone,
[#29118] [Bug #3051] psych is too osx-specifc — Michael Graff <redmine@...>
Bug #3051: psych is too osx-specifc
[#29128] [Bug #3052] DRb::start_service fails to detect used port — Chris Schlaeger <redmine@...>
Bug #3052: DRb::start_service fails to detect used port
Issue #3052 has been updated by Yusuke Endoh.
[#29131] [trunk:bug] Many rubygems tests fail with psych tests. — Tanaka Akira <akr@...>
Many rubygems tests fail with psych tests.
(2010/03/30 17:55), Tanaka Akira wrote:
On Tue, Mar 30, 2010 at 07:13:32PM +0900, NARUSE, Yui wrote:
[#29161] [Bug #3058] Inconsistent eol conversion of IO#read on Windows — Heesob Park <redmine@...>
Bug #3058: Inconsistent eol conversion of IO#read on Windows
[#29167] [Feature #3067] complex.c : Question: why Complex#~ is disabled? It's in the doc — Benoit Daloze <redmine@...>
Feature #3067: complex.c : Question: why Complex#~ is disabled? It's in the doc
[#29179] [Bug #3071] Convert rubygems and rdoc to use psych — Aaron Patterson <redmine@...>
Bug #3071: Convert rubygems and rdoc to use psych
Doesn't this mean the the RubyGems codevase would now be forked
Issue #3071 has been updated by Nobuyoshi Nakada.
[#29186] [Bug #3072] Classes Inheriting from Data — Run Paint Run Run <redmine@...>
Bug #3072: Classes Inheriting from Data
[ruby-core:28742] Re: When a trace hook raises an exception, should it terminate the program?
Let me clarify a bit because I think some of the facts (some by me) may have
been misrepresented.
I came across this in implementing a debugger command called "raise". The
purpose of this is to force an exception to occur outside of the debugger or
in the debugged program. And in fact this does work. Sort of..
$ rbdbgr xyz.rb
-- (xyz.rb:1)
begin
(rbdbgr): list
1 -> begin
2 x = 1
3 rescue => e
4 puts "rescued #{e.inspect}"
5 end
(rbdbgr): step
-- (xyz.rb:2)
x = 1
(rbdbgr): list
1 begin
2 -> x = 1
3 rescue => e
4 puts "rescued #{e.inspect}"
5 end
(rbdbgr): raise RuntimeError
rescued #<RuntimeError: RuntimeError>
$
The "sort of" part is that in Ruby 1.9 the implementation of tracing sets a
bit in the thread structure which turns off tracing into the tracer (or
debugging into the debugger). When an exception that passes from hook to
non-hook occurs, this bit doesn't get cleared.
Changing the program that was originally posted will show this better:
s = Proc.new {
|event, file, lineno, mid, binding, klass|
puts "#{event} #{mid} #{lineno}"
unless $x
$x = true
raise RuntimeError
end
}
begin
set_trace_func(s)
puts "after trace func"
rescue
puts "Rescued"
end
puts "After begin"
Run this in Ruby 1.9 and perhaps it is more apparent that the program
continues to the end. In the original posting if you look carefully you'll
see that the rescue did run *after* the trace hook issued a raise inside the
begin block. It is the *second* raise issued in the hook function that
terminates the program because the debugged program is no longer in a
rescue'd block.
From what you describe from JRuby, it sounds like it has a similar behavior
possibly because it is implemented underneath in a similar way. So
rationalizing this as "this makes sense because this happened in between
statements and not in the program" I don't think is accurately capturing
what's going inside either interpreter.
One of the uses of a trace hook is in a debugger where it is normal to have
code run in between the debugged program's statements which have lasting
effect. For example that's how variables can get changed.
So again, how is raising an exception from a trace hook defined? Or how
should it be defined?
Trace hooks in general could be undefined so anything you want to do is okay
including not implement them. That would cover the current behavior.
Similarly it could be that if if a hook raises is a exception that it
doesn't catch you get undefined behavior. That too would cover the current
behavior.
But declaring that an uncaught exception in a trace hook terminates a
program does not accurately describe how Ruby 1.9 (and probably JRuby)
currently behave.
On Thu, Mar 18, 2010 at 1:59 AM, Charles Oliver Nutter
<headius@headius.com>wrote:
> On Wed, Mar 17, 2010 at 5:42 AM, Rocky Bernstein <rockyb@rubyforge.org>
> wrote:
> > In Ruby 1.8 and the Ruby 1.9 trunk when running a trace hook that raises
> an
> > exception not caught by the hook, the program terminates -- whether or
> not
> > there is a rescue further up the call stack, i.e. in the non-hook body.
> >
> > Ruby 1.9 also gives a stack trace, while Ruby 1.8 doesn't.
>
> This is a pretty peculiar situation. What *should* happen? With the
> hook set, if it starts raising exceptions, you start getting errors
> happening not in particular methods but in the "inbetween" space
> between method calls and lines and pretty much everything. In your
> example, even if it rescues, it would hit a c-call event (for the
> puts) and raise again before printing anything out.
>
> Perhaps the specification could say that a ruby-land set_trace_func is
> wrapped with an implicit rescue and disabled if an error is raised? Or
> something?
>
> > How do JRuby, IronRuby and Rubinius and other Rubies handle this? And
> what
> > do the specifications say?
>
> JRuby also terminates. Note that the trace output is slightly
> different, since we have different call sequences for some things:
>
> ~/projects/jruby ➔ jruby --debug hook_thing.rb
> line :8 (the first event that fires after the hook is set)
> c-call === :8 (this is the rescue calling ===)
> c-call backtrace :1 (this is the toplevel of JRuby trying to get the
> backtrace)
> c-call first :1 (fallback code because backtrace errored too?)
> Exception in thread "main" c-call first :1 (finally, we give up)
>
> There's so many calls and line events happening here, it's pretty much
> impossible for anything good to come out of it. Catastrophic failure.
>
> As for other Rubies...I don't know if IronRuby supports
> set_trace_func, but Rubinius and MacRuby do not.
>
> > If it is the case that raising an exception in a trace hook
> unconditionally
> > terminates the hooked program, programmers that want to write a trace
> hook
> > that plays nice with programs it hooks against should wrap the hook in a
> > begin/rescue block. Or make sure your code never raises an uncaught
> > exception.
>
> That seems wise.
>
> - Charlie
>
>