Using the one-click under Windows. Interpreter version 1.8.2.
Language issues:
super doesn't behave like super()
you need to use return explicitly within an ensure
blah while and blah until don't behave like do...while in C
Other issues:
rdoc doesn't like mixing a list of directories with its other arguments
rubygems breaks require
Comments?
- jas.
Hi,
Language issues:
super doesn't behave like super()
Can you be more specific? What do you expect for super()?
you need to use return explicitly within an ensure
blah while and blah until don't behave like do...while in C
They are supposed to behave so, if I understand you correctly.
matz.
···
In message "Re: Niggly Issues With Latest Version" on Wed, 12 Jan 2005 16:46:18 +0900, jasonhutchens@gmail.com (Jason Hutchens) writes:
Jason Hutchens wrote:
super doesn't behave like super()
Did they ever? I don't have 1.8.1 handy, but I think "super" has always meant "call superclass method with same args" and "super()" has always meant "call superclass method with no args".
jasonhutchens@gmail.com (Jason Hutchens) Jan 11, 2005 at 11:43 PM wrote:
Using the one-click under Windows. Interpreter version 1.8.2.
Language issues:
blah while and blah until don't behave like do...while in C
Comments?
->print 'before ' ;begin print 'hello ' end while false
before hello nil
->print 'before ' ;begin print 'hello ' end until true
before hello nil
->system 'ruby --version'
ruby 1.8.2 (2004-07-29) [i386-mswin32]
From _Programming Ruby_:
"While and Until Modifiers:
expression while boolean-expression
expression until boolean-expression
If expression is anything other than a begin/end block, executes
expression zero or more times while boolean-expression is true (false for
until). If expression is a begin/end block, the block will always be
executed at least one time."
"Block Expressions:
begin
body
end
Expressions may be grouped between begin and end. The value of the block
expression is the value of the last expression executed."
Differs from (note the capitalization):
"BEGIN and END Blocks: Every Ruby source file can declare blocks of code
to be run as the file is being loaded (the BEGIN blocks) and after the
program has finished executing (the END blocks).
BEGIN {
begin code
}
END {
end code
}
A program may include multiple BEGIN and END blocks. BEGIN blocks are
executed in the order they are encountered. END blocks are executed in
reverse order."
Cordially,
Yukihiro Matsumoto wrote:
> blah while and blah until don't behave like do...while in C
They are supposed to behave so, if I understand you correctly.
I stumbled on this one myself, although I'm not sure it's a bug, and it's not a 1.8.2 issue.
The following two lines behave differently, and it's not obvious why.
puts 'x' until true
begin puts 'x' end until true
This first example prints nothing. The second example above prints 'x'. In C, the body of a do/while loop always executes at least once, as in the second example. The failed assumption is that the first example is just a shorter version of the second example.
···
In message "Re: Niggly Issues With Latest Version" > on Wed, 12 Jan 2005 16:46:18 +0900, jasonhutchens@gmail.com (Jason Hutchens) writes:
--
Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/>