1818-2179

1598-1965 subjects 1999-2408

^ Cygwin make problem
1818 [Bob.Davison ] I am running Cygwin B20 on NT4 SP4, Intel Pentium Pro 200, 64MB.
+ 1819 [thucdat hotm] I have also NT4, I wanted to do the same, but was not sure which files to
+ 1821 [eban os.rim.] Edit ext/Setup or run configure with `--enable-shared'.
  1822 [Bob.Davison ] I ran configure with --enable-shared and all was well.

^ Very strange problem in chomp and/or sub, or with me
1825 [Dave thomase] I have a very strange problem with chomp, but I can't produce a simple
1828 [matz netlab.] No, it's a bug.  It'll be solved by the following patch, which I

^ Followup to chomp and/or sub bug
1826 [Dave thomase] Is this something to do with the latest lazy dup in string.c?
1827 [Dave thomase] And to followup my own post: if I revert to -r1.23 string.c, the

^ comp.lang.ruby is now in the CFV queue.
1832 [schneiker ju] FYI,

^ Re: Ruby 1.5.3 under Tru64 (Alpha)? ==> FAQ item?
1833 [schneiker ju] Over several months, I've noticed a number of similar sorts of requests for
1838 [matz netlab.] Yeah, Dave, please add the entry to suggest bug reports to be with
1841 [Dave thomase] It'll be in the next version.

^ enum examples?
1834 [hgs dmu.ac.u] Has anyone any examplse of using the Enumerable module?  I've had a
+ 1835 [clemens.hint] enum examples?
| 1837 [hgs dmu.ac.u] So that is all.  I saw a bunch of methods based on each but was not
+ 1836 [Dave thomase] Clemens has give a great answer about Enumerable.
+ 1839 [matz netlab.] What kind of examples you have in mind?
  + 1840 [hgs dmu.ac.u] I was at cross purposes then.  I was thinking of enumerated types
  | 1865 [c.hintze gmx] matz has already show you an implementation that could be used to
  | 1877 [hgs dmu.ac.u] This looks interesting.  I will have to study it closely.
  + 1842 [crouton duel] Enumerable is not 'enum' in C/C++ :-p

^ Matrix Multiplication in Ruby
1843 [thucdat hotm] I remmeber having seen three code samples in Perl, Tcl & Python to multiply
+ 1846 [Dave thomase] require 'matrix'
+ 1852 [matz netlab.] require 'matrix'
  1853 [thucdat hotm] This is incredible, no nested loops necessary, it's the class Matrix that

^ Minor irritation, can't figure out how to patch it though!
1844 [hgs dmu.ac.u] I was considering how difficult it would be to patch Ruby to accept
+ 1847 [Dave thomase] module British
| 1854 [matz netlab.] Hmm, this one and the one in [ruby-talk:01846] are almost identical to
| 1855 [Dave thomase] It's the mind-altering subliminal messages you put in the source code
+ 1849 [matz netlab.] Hmm, Ruby may be too Americanized. :-)
  1876 [hgs dmu.ac.u] support existing variants.
  1893 [mengx nielse] I do not have problem with either of the spellings. But I always wonder
  1913 [matz netlab.] Personally I do not like lines around identifiers, except for synonym
  1969 [mengx nielse] Would init_object/delete_object  or construct/destruct has better chance
  1993 [matz netlab.] There is finalizers.  check for lib/final.rb and lib/tempfile.rb.

^ Perl ==> Ruby Question
1845 [DDouthitt cu] I looked at the archives, but didn't find what I want.  How do I convert this fragment into Ruby?
+ 1848 [Dave thomase] $_ = "Quick:brown:fox"
+ 1851 [matz netlab.] var1, var2, var3 = str.split(":")

^ bug database (Re:  Re: Ruby 1.5.3 under Tru64 (Alpha)? ==> FAQ item?)
1850 [matz netlab.] Not yet.  And why not on www.ruby-lang.org?  I'll gradly give you the

^ Another question from a newbie
1856 [DDouthitt cu] Why does this snippet fail?
1857 [Dave thomase] This defines a class method (also called by Ruby a singleton
1858 [andy Toolshe] Why are you making comment a class method?
1859 [DDouthitt cu] By the way, there's another fun Ruby trick for doing this kind of
+ 1861 [DDouthitt cu] -:9: undefined local variable or method `comment?' for #<Object:0x40061860> (NameError)
| 1863 [Dave thomase] That means that 'line' is type Object, and not a String. This is very
| 1866 [DDouthitt cu] ruby <<'!*'
| 1867 [DDouthitt cu] Why not use this pattern substitution (instead of gsub! and yield) -
| 1868 [Dave thomase] The s/// is a sub(/\s*#.*/, '').
| 1869 [DDouthitt cu] Whoops, wrong version........... I have a couple of ruby "programs" (embedded in ksh functions) that do almost the same thing....
| 1872 [Dave thomase] Should be:            line.comment?
+ 1862 [Dave thomase] Yup! I think it is. The gsub is there because it has slightly

^ starting with oop and ruby
1860 [ljlane debia] I'm just starting to learn Ruby and I really need help with the
1864 [Dave thomase] There's a nice guide at
1938 [ljlane debia] Excellent.  Thanks.  I didn't happen across that in the FAQ or at

^ Scanning for comments....
1870 [DDouthitt cu] The s/// is a sub(/\s*#.*/, '').
1888 [DDouthitt cu] Another even better idea!!!!

^ Yet ANOTHER Perl2Ruby Question
1871 [DDouthitt cu] ($var1, $var2, $var3) = /pattern (sub1) (sub2) (sub3)/;
1873 [Dave thomase] A regular expression match returns the offset of the start of the

^ object creation
1874 [Andy Toolshe] Just a quick question -- is the following sequence the correct
+ 1875 [c.hintze gmx] object creation
+ 1890 [matz netlab.] Yes.  But I think it's better for T_DATA object to use
  1894 [andy Toolshe] Agreed, but here's my real question: suppose you have a non-built-
  + 1912 [matz netlab.] I haven't settled my mind yet about this.
  | 1921 [c.hintze gmx] Perhaps I have misunderstood Andy, but I thought he suppose to have a
  | 1922 [andy Toolshe] If a class defines it's own new (or open, or whatever) wouldn't
  | + 1923 [andy Toolshe] Well, I actually asked both questions.
  | | 1926 [c.hintze gmx] That sounds okay for me. But please read also my reply to
  | + 1927 [c.hintze gmx] It would be easier, of course. But it would also be slower and would
  |   1930 [Dave thomase] Now I'm probably missing something, but wouldn't calling the
  |   + 1956 [c.hintze gmx] Boommer ... ... ... :-)
  |   + 1957 [matz netlab.] Yes.  For example, Dir#initialize works like reopen.
  + 1919 [c.hintze gmx] Hmmmm! I would say that this is impossible, at a first glance. This

^ Global matching/sub?
1880 [excalibor de] I've been trying to do global matching (what would be / /g in grep or perl) but I cannot find any way to do it...
1881 [crouton duel] Use gsub (gsub!) instead.

^ Learning Ruby
1882 [thucdat hotm] $ruby -r 'irb/main' -e IRB.start
+ 1884 [Dave thomase] That should be word[0]. Square brackets are for indexing, and round
+ 1887 [clemens.hint] Learning Ruby

^ Matrix object instantiation
1883 [thucdat hotm] Red Hat Linux release 6.0 (Hedwig)
1885 [Dave thomase] m1 = Matrix[[1,2],[2,4]]
1886 [thucdat hotm] Now, I realize.

^ [ruby-1.5.3] require / SAFE
1889 [decoux moulo] * eval.c (rb_f_require): prohibiting require() in the secure mode
+ 1899 [matz netlab.] It used to raise SecurityError in $SAFE >= 4, but changed not to raise
+ 1901 [decoux moulo] OK, I've seen the disparition of rb_secure(4) in rb_f_require,  but my
  + 1911 [matz netlab.] Under the following condition, I think.
  + 1949 [decoux moulo] I still don't understand how it work, sorry
    + 1950 [matz netlab.] Sorry, it is a bug.  I'll fixed it in the next release.
    + 1951 [decoux moulo] What will be the result with ?
      + 1952 [matz netlab.] /tmp/b.rb:3:in `autoload': Insecure operation `autoload' for level 4 (SecurityError)
      + 1953 [decoux moulo] OK, Thanks.

^ Possible problem in string.c
1892 [Dave thomase] In v1.25
1959 [matz netlab.] (ship)

^ File operations
1895 [DDouthitt cu] I'm looking at file operations, and am getting confused - yet I may be running into "TMTOWTDI" :-)
1898 [Dave thomase] For regular files, there is none. However, the 'open' function also

^ Ruby Syntax similar to other languages?
1896 [DDouthitt cu] This leads into something I've noticed.  Perl follows this idea also; thus
1910 [matz netlab.] sub/gsub is from awk.  ! is inspired from scheme.
1954 [schneiker ju] madness....
1955 [matz netlab.] What's the benefit of foo.s(/pat/, "repl", "g") over foo.gsub(/pat/, "repl")?
+ 1962 [clemens.hint] Only to have not *two* methods, but only one. But then I would prefer
| 1996 [matz netlab.] Hmm, saving brain's memory slot?
+ 2003 [schneiker ju] "repl")?
  + 2010 [matz netlab.] Hmm, although I think options i, s, m, o, and x should belong to
  | 2020 [schneiker ju] different
  | 2023 [Dave thomase] If 'g' was an attribute of Regexp, then what would
  | 2024 [decoux moulo] while line =~ /asdf/g
  | 2025 [matz netlab.] Adding 'g' as a Rexexp option makes me feel like Perl.  We have
  | 2027 [excalibor de] Good morning, (for me :)
  | + 2032 [DDouthitt cu] And why not?  line.scan is good, but for old Perl (4) hackers like me, /xxx/g would just be one more encouragement to give up Perl for a nice OOP like Perl!
  | | 2033 [DDouthitt cu] s/Perl\!/Ruby!/
  | | 2037 [schneik us.i] Someone else has aready partly answered this, however, from Programming
  | + 2040 [matz netlab.] Good morning, (for me :)
  + 2012 [quinn envy.u] Well, the way ruby does things currently makes sense to me.  And ruby's
    + 2013 [DDouthitt cu] I'm a VERY newbie to all this (less than a week! :-) but why not use some form of
    + 2019 [schneiker ju] different

^ super
1897 [DDouthitt cu] I was redefining a new method, and used some code something like this
1909 [matz netlab.] In Smalltalk, super is the virtual instance of the superclass.

^ Enumerations and all that.
1900 [hgs dmu.ac.u] Thank you to the people who responded to my questions about Enumerated
1902 [Dave thomase] I was wondering: if, rather than making each enumeration an instance,
1905 [hgs dmu.ac.u] I am not sure how to do that on the fly.  In what binding can I
+ 1906 [thucdat hotm] I wonder if attempt to program in Ruby pascal alike (or for that matter any
| 1917 [hgs dmu.ac.u] All languages borrow from other languages.  Enums are commen enough
+ 1924 [Dave thomase] Well, I've thinking about enumerated types, and was wondering how they
  1963 [hgs dmu.ac.u] Granted, but we can see that thing.type has changed.
  1972 [Dave thomase] That's in accordance with Meyer's uniform access principle, and a
  1975 [hgs dmu.ac.u] Oh, I see.

^ I'm stumped...!
1903 [DDouthitt cu] Yes, I DO read the Ruby User Guide....
+ 1907 [Dave thomase] You're calling 'open' as a class method (or what the documentation
+ 1914 [gotoken math] This variable `oratab' is a local variable, which doesn't shared
  1915 [DDouthitt cu] Ahhhh.... the light is starting to dawn!  :-)
  1916 [Dave thomase] Because here you're bypassing your open method and using File's.

^ variable prefixes (Re:  Re: Matrix Multiplication in Ruby)
1908 [matz netlab.] OK, here's the list of variable prefixes.

^ Matrix inconsistent ERR
1920 [thucdat hotm] Matrix[[1,2,3],[4,5]]
1940 [matz netlab.] Because Matrix[[1,2,3],[4,5]] i.e.

^ Class Variables
1925 [DDouthitt cu] How do I do the equivalent of something like this....
1928 [Dave thomase] class Foo
1929 [DDouthitt cu] I DID find class constants (see I do read the manual! :-)
1931 [Dave thomase] Ah-ha! In that case, you want to use attributes
+ 1932 [DDouthitt cu] Doesn't that work only in modules?  I can't find 'attr_accessor'
| 1933 [Dave thomase] 1. class Class is a sub-class of class Module. (try saying that
| 1934 [DDouthitt cu] class Instance
| 1960 [matz netlab.] Instance variable names should be in the pattern of /^@[a-zA-Z0-9_]+/.
+ 1964 [hgs dmu.ac.u] Are these not accessing Instance variables, not class variables? I assume
  + 1966 [DDouthitt cu] I looked in the manual for where it said what variable names could be.
  | 1997 [matz netlab.] It's in yacc.html.  Oops, the terminal `identifier' was undefined.
  + 1973 [Dave thomase] Yes, but as the class constant -> pseudo class variable hack is in the
    1976 [hgs dmu.ac.u] Ok, I was just beginning to get confused myself :-)

^ Etc.getpwuid
1935 [DDouthitt cu] print Etc.getpwuid.values.join(":"), "\n"
1939 [matz netlab.] Say

^ BUG???
1936 [DDouthitt cu] [..... I received this output today......]
1958 [matz netlab.] Sorry, I can't reproduce your problem.
1968 [DDouthitt cu] I'll do better than that :-)
1995 [matz netlab.] Thank you, I'll try to reproduce (and fix).

^ BUG?  (phase 2)
1937 [DDouthitt cu] [....... same script, new error......... ]

^ no Fixnum#new ?
1942 [quinn envy.u] Ok, I can add methods to a built-in class well enough (yes I know about succ,
+ 1943 [Dave thomase] Heh! I'm British. I'm not annoyed. Strange, but not annoyed.
| 1998 [schneiker ju] the
| 2009 [matz netlab.] Hmm, thank you for votes.
| 2018 [schneiker ju] Well, you may want to save these sorts of things until such time that it
+ 1961 [matz netlab.] Fixnums are immediate data, so that you can't inherit from it.

^ Class variables
1944 [Dave thomase] Should I document the @@xxx class variable stuff in the book?
1945 [matz netlab.] Probably.  It works fine except for
1946 [Dave thomase] Kernel#shared_variables
1947 [matz netlab.] There should be for consistency.
1948 [Dave thomase] ;-)
2002 [schneiker ju] As a people new to the language, I'd also vote for 'class variables'.
2054 [mengx nielse] Me, too.
2056 [thucdat hotm] Enough research done by C++, Java, Eiffel, etc. community regarding this

^ ":symbol undefined " in my extension library
1967 [j.b.huijsman] I'm trying to write a ruby extension to the newt library (used in redhat's
1970 [decoux moulo] aestivum% cat extconf.rb

^ Ruby 1.4.3 Linux RPM Question
1971 [DDouthitt cu] # rpm -Uvh ruby-1.4.3-3mdk
1974 [crouton duel] Maybe it is the version of ncurses under the packager's
2085 [pixel_ mandr] yep, ncurses-5 has been out for a while...

^ Iterating over all instances of a class
1977 [DDouthitt cu] I just KNOW this is related to "collection" somehow, or that there is a way to do this.  However, the way I do it now is to create an array of instances, but this creates some unwieldy *.find{ |i| .... } sequences and worse.  Can't I do a find over instances of a class?
1978 [crouton duel] oll_instances_of_Foo = []
1979 [DDouthitt cu] Cool!  I do think you meant "ObjectSpace" and "all_instances..." in
1980 [Dave thomase] Perhaps you want to look at Hashes...

^ Time::at
1981 [DDouthitt cu] or whatever the right syntax is :-)
+ 1982 [Dave thomase] Try
+ 1983 [hgs dmu.ac.u] You have not used it as a method of anything.  So it is looking
  1984 [hgs dmu.ac.u] s/on/at/
  1985 [DDouthitt cu] That worked beautifully!  I'm actually beginning to understand this :-)
  1986 [Dave thomase] three dots
  1994 [matz netlab.] (Grin)
  2028 [excalibor de] You surely meant "on".sub!(/on/, "at")

^ Is Matrix in Ruby dynamically expandabl ?
1987 [thucdat hotm] Is Matrix in Ruby dynamically expandable rowwise & columnwise?
1988 [Dave thomase] The source of the Matric class is actually available in the '/lib'

^ English Ruby/Gtk Tutorial?
1989 [schneik us.i] Is there an interim version (however primitive) of the English Ruby/Gtk
+ 1990 [ljlane debia] ljlane@debian.org
| + 1991 [ljlane debia] Oops. That's not GTK. Sorry.
| + 2000 [schneiker ju] Interesting. Thanks.
+ 1992 [igarashi ued] Sorry, it is not yet available.
| + 2001 [schneiker ju] I'll look these up.
| + 2014 [manamist whi] This is multipart message.
| | + 2016 [manamist whi] SugHimsi.
| | + 2021 [schneiker ju] invaluable
| | + 2031 [igarashi ued] I think so too.
| | + 2049 [aamine dp.u-] ^^;;;
| | + 2055 [manamist whi] This is multipart message.
| |   2059 [MAP2303 mapl] Ah, sorry for my lazy(^^;
| + 2029 [igarashi ued] Here is a half of my part.
|   + 2035 [fukusima got] And here is my part.
|   | + 2048 [schneiker ju] Thanks,
|   | + 2051 [maki inac.co] And my part.
|   + 2047 [schneiker ju] Thanks,
+ 2176 [igarashi ued] ...
  2179 [schneik us.i] Thanks.
threads.html
top