[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02242] Re: DBC in Ruby

From: Andrew Hunt <andy@...>
Date: 2000-03-29 12:20:00 UTC
List: ruby-talk #2242
Hal writes:

    >I'm working on a DBC mechanism in Ruby. Let me crank 
    >a little longer and I'll make it public for everyone's 
    >comments and changes. And there WILL be changes. :)

Excellent!  Best of luck.

The big thing is to make sure that inheritence is handled properly.
If you define an invariant for one class, it has to be called on
exit from any method in that class and any subclasses as well.

Similarly, a precondition or postcondtion on a method still has
to be executed even if a subclass has redefined the method itself.

Somehere here I have a paper on Eiffel-like assertions in Smalltalk
(I think it was from a university in Spain), I'll see if I can
dig that up.

I find DBC to be an amazing tool to find obscure bugs, and 
even just *thinking* about what the preconditions and invariants
for a class should be is a huge help.

/\ndy

In This Thread

Prev Next