#ruby-lang - Fri 30 Mar 2007 between 08:12 and 09:09



_ruioptparse
kujait could be that optparse is removing the entry from ARGV
try writing a small test script to verify that is the case
a script that simply does a p ARGV
ruby -e 'p ARGV' -f file
err you gotta put that script in a file
-e apparently doesn't allow ARGV
_ruiyes, its optparse :-\
thanks kuja
kujanp
weirdoheya
i noticed that undeclared variable access errors are detected at runtime. can i somehow detect them at compile-time?
kujano
weirdo:/
kujabecause methods and variables can be defined dynamically.
Arsen7weirdo: There is no compile-time in ruby, at least not distinct from run-time.
zorglu_q. in ruby, do i have to handle the window/unix path difference myself, or ruby does it transparantly ? here i talk about difference like on window "my\path" while in linux "/my/path"?
weirdoare there any plans for introducing the all-powerful goto instruction?
kujazorglu_: Using / will work in all cases
zorglu_kuja: great :) thanks
kujanp
weirdo: There is try/catch
er
throw/catch
weirdois inject() the same as lisp's REDUCE?
Arsen7I suppose you should ask on #lisp-lang ;-))))
shevyor explain what lisp's reduce does
ehirdis the ruby version number in a variable?
i only want two digits i.e. 1.8
(that is, what's used in $PREFIX/lib/ruby/ paths)
kujaRUBY_VERSION
work with it to your needs.
ehirdruby -e'puts RUBY_VERSION.split(".")[0..-2].join(".")' <-- heh
kujaheh
RUBY_VERSION[0...-2]
ehirdRUBY_VERSION is an array?
kujaNo, it's a string.
shevyruby -e'puts RUBY_VERSION[0..-3]'
ehirdah, right... what if ruby 1.34.2 comes out
shevyor 1.92.14

Page: 4 11 18 25 32 39 46 53 

IrcArchive