262615-271097 subjects 263034-264024
PHP.unserialize's strange behaviour
262808 [knirirr@gm i] I have some code that needs to obtain information from a web service in
263369 [tom.hurst@cl] How is it odd? You get the same thing unserializing in PHP.
263370 [knirirr@gm i] Unfortunately for me it seemed odd because I cocked up and was causing a
Why aren't filenames being lowercased?
262809 [pbailey@bn .] This is a simple script that I'm just using for something bigger in the
+ 262814 [florgro@gm i] new_name = tiffile.downcase
| 262815 [pbailey@bn .] Well, all of the filenames should be lower-cased, because of my
+ 262818 [chris.hulan@] See inline comments
262819 [pbailey@bn .] I don't understand. Yes, I've made them lower-case, and then, I'm just
262820 [jan.svitok@g] 1. You have to work with the new filename. I.e. after you rename the
262822 [pbailey@bn .] Thanks. I guess I thought that the File.rename was enough, but,
Net::HTTP, inheritance + proxy problem
262810 [rlindby@gm i] I am trying to create a child class from Net::HTTP and the following
262912 [jan.svitok@g] class Connection < Net::Http
test-all test suite fails upon Ruby 1.8.5 compilation
262821 [david.krmpot] To compile Ruby 1.8.5 for Ubuntu 6.06 (since apt-get installs 1.8.4 and
+ 262843 [david.krmpot] * Run 'make install' *before* running 'make test-all'. The test
+ 262930 [nakahiro@sa ] Above 'shutdown' problem is caused by previous error. Can you show me
262973 [david.krmpot] running the tests. That was the reason for errors because test suite
263126 [nakahiro@sa ] I missed the second post of yours. Thanks for replying.
mod_ruby + mod_deflate
262823 [antirez@gm i] I'm running an application written in Ruby using mod_ruby wtih Apache,
262845 [noodlet@gm i] That's fine, but apache may not know that. First, get rid of the
263131 [antirez@gm i] AddType text/html .rhtml
HTTP post constantly submitting
262833 [johnmcauley@] I have a http request that I have to parse and re-submit to another
Ruby Tidy API for HTML::Tag
262837 [thebarge@gm ] I'm trying to use the scrAPI to scrape a website. It apparently uses
Re: change method Array.new? (Was: Unexpected behavior with
262839 [aarmbruster@] I have no problem with Array.new(size, obj), in fact I think it is a
+ 262940 [dzwell@gm il] You'll find the same behavior in every type of function, and you'll get
+ 262947 [pedz@ea es f] This seems really obvious to me and it must seem really non-obvious to
count : array to array of hashes
262841 [jeansebastie] I'm tryind to count distinct ids from an array (array_of_ids =
+ 262844 [robert.dober] irb(main):005:0> a=[1,2,3,42,2,2,3]
+ 262847 [stefano.croc] 1- in the inject block, you return elt, which is (or should be, if the code
Variable-Length arg list and blocks
262848 [lolz.llolz@g] a short question: is it possible to use variable length argument lists
262850 [stefano.croc] def test(*args, &blk)
262852 [lolz.llolz@g] Your reply was very fast :-)
network failure with sms alert using RUBY project
262849 [lorfaz@gm il] can i use ruby to make this project?
+ 262853 [greg.kujawa@] I have done similar things for network/server/logfile monitoring using
+ 262855 [ecomba@ma .c] Actually you could use Rannel (http://rubyforge.org/projects/rannel)
Ruby Array to Hash (a better way?)
262857 [mike.hallora] Hey Guys,
+ 262858 [lopx@ga et .] a = ["foo", "bar", "foo1", "bar1","foo2", "bar2"]
| + 262876 [kyleaschmitt] I've been using Ruby for awhile, and I'm afraid I've never used the *
| | + 262877 [sepp2k@go gl] It turns an array into a list of parameters (or, if used in a method
| | + 262878 [dblack@ru yp] It "un-arrays" its operand; in other words, given an array, the *
| + 262902 [shortcutter@] If you are using Enumerator anyway you can as well do
+ 262859 [gthiesfeld@g] Use Hash#
[ANN] ParseTree 2.0.0 Released
262860 [ryand-ruby@z] ParseTree version 2.0.0 has been released!
262890 [pit.capitain] Ryan, thank you for your continuous work on those libraries. I have a
+ 262892 [ryand-ruby@z] not without doing the usual caller() manipulation stuffs, no.
| 262894 [pit.capitain] OK. Thanks.
+ 263320 [drbrain@se m] SuperCaller can do this. It was waiting on a release of PT, because
263345 [pit.capitain] Thanks Eric, I'm looking forward to the relase. But maybe I don't need
[ANN] flog 1.0.1 Released
262861 [ryand-ruby@z] flog version 1.0.1 has been released!
ID3Lib 0.5.0 problems installing on FreeBSD
262863 [lancecarlson] Gems is not finding my id3.h file which is clearly inside of /usr/
262962 [felipe.contr] You could try libmtag instead.
263032 [lancecarlson] I will definately check it out. I was using mp3info before id3lib but
263873 [lancecarlson] btw, i figured it out. My comments on this page should help anyone
Invoking a web service
262866 [antonio.fern] Im trying to connect to a webservice developed in java, but im getting
262913 [antonio.fern] Anybody can give me an hint?
[ANN] flog 1.0.2 Released (read: I suck)
262874 [ryand-ruby@z] flog version 1.0.2 has been released!
Re: Railless ActiveRecord [Problem 2]
262879 [ari@ar br wn] Ok. I have another Problem
+ 262881 [ari@ar br wn] /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
+ 262884 [gregory.t.br] Because gem() doesn't require anything.
262885 [ari@ar br wn] Bwah? But I've used it before! How can this be?
262887 [gregory.t.br] require "rubygems"
Easy REST server w/o views or controllers?
262891 [luke@ma st p] I'm in the processing of refactoring Puppet's networking, which
+ 262899 [james.britt@] Interesting. One thing I like about Nitro is that it doesn't presume
+ 262922 [khaines@en g] You could use IOWA. It's pretty well self contained, doesn't really care
+ 262941 [transfire@gm] T.
| 262942 [james.britt@] These guys never sleep.
| 262985 [transfire@gm] He he. Yea, but do they draw us pretty pictures?
+ 262964 [phelan@tt ec] I use camping all the time for little projects where I just want a
+ 263143 [ara.t.howard] hey luke - how goes?
262896 [chen_li3@ya ] Just wonder which binary editor is most used by the Rubists.
+ 262898 [o.renaud@la ] If you use emacs, there is the hexl-mode for editing binary files. M-x
+ 262900 [hhausman@gm ] hth,
+ 263008 [alexandru@gl] Biew (biew.sf.net) on Linux. Hiew, ages ago when I was using Windows.
how to determine which file a method is defined in
262897 [fenton.trave] I would like to know if there is a way to definitively tell which file a
+ 262914 [tim.pease@gm] The simplest solution would be to use grep on the .rb files that you
+ 262918 [george@nu ru] You might also want to try http://unroller.rubyforge.org/
Private methods not so private?
262904 [lolz.llolz@g] I'm using Ruby 1.8.2 and I'm reading the book "Programming Ruby 2nd
+ 262908 [alex@bl ck e] Yes - send trumps private. Private in Ruby is more of a guideline than
| 262924 [djberg96@gm ] It's a guideline in any language.
| + 262939 [skye.shaw@gm] It is in C++ and Java, maybe even VB, if I recall... (I try not to
| + 262987 [jorgen@de so] Isn't that a Bad Practice (tm)? Private methods are mostly meant for the
| + 262989 [dohzya@gm il] It is a root of bad practices, but it may be necessary... I think a good
| + 262990 [dblack@ru yp] ...
| 263063 [dchelimsky@g] Conventional wisdom in the Agile/TDD community is that you shouldn't
| + 263077 [dan@ze aw b.] I've written some interesting use cases concerning send here. FYI: my
| + 263087 [dblack@ru yp] ...
+ 262909 [ben@bl yt in] Yes. send bypasses protection levels, for reasons I'm not really clear
262968 [dzwell@gm il] Ben,
263025 [ben@bl yt in] Right. I was just trying to answer the original question :)
263059 [lolz.llolz@g] thanks for your explanations. And I didn't know that ruby allows the
263073 [ben@bl yt in] Yup. That's what @something variables are.
oddity with RegExp
262905 [r.fulton@au ] I'm clearly missing something! I have a log analysis application that
+ 262910 [alex@bl ck e] I'm not sure what you're expecting here - all these patterns are
+ 262911 [warrenb@aq i] Russell,
262920 [r.fulton@au ] Thanks Warren! Like I said I was clearly missing something. I blame my
Invoking a web service
262915 [antonio.p.fe] Im trying to connect to a webservice developed in java, but im getting
262919 [tim.pease@gm] Yes, someone can give you help on this. They just have not had the
Invoking a web service
262916 [antonio.p.fe] Im trying to connect to a webservice developed in java, but im getting
262936 [nakahiro@sa ] I think the server is implemented with MS SOAP Toolkit 2.0.
[ANN] RMagick 1.15.8
262917 [TimHunter@nc] I've just uploaded RMagick 1.15.8. This release includes a fix for a bug
Ruby Association launched
262929 [l.g.chin@gm ] Last friday, matz and NaCl launched the Ruby Association, "an
262945 [dangerwillro] Looks like they formed a group to get Ruby taken more seriously in
262946 [vjoel@pa h. ] They could start with Toyota, who unfortunately (for me and for them)
[ANN] mogilefs-client 1.2.1 Released
262931 [drbrain@se m] mogilefs-client version 1.2.1 has been released!
defining methods dynamically?
262932 [kenneth.m.mc] Having looked through the Class and Method rdoc, and the Reflection
+ 262934 [dblack@ru yp] There's actually no other way to do it :-) But I think what you're
| 262993 [wayneeseguin] ...
| 262995 [dblack@ru yp] a = 1
| 262998 [wayneeseguin] ...
| 263155 [botp@de mo t] # That makes complete sense.
+ 262937 [botp@de mo t] # Having looked through the Class and Method rdoc, and the Reflection
262996 [vasudevram@g] I think there are at least two ways to do it, both of which I've seen
262933 [darmaniiii@y] on
Is there a standard "assert" idiom in Ruby?
262935 [kenneth.m.mc] If you saw an earlier version of this question, apologies...I haven't
+ 262948 [gregory.t.br] Because Ruby's objects (and thus, their methods) are always open for
| 262955 [kenneth.m.mc] I'm not talking anything quite so complex as design by contract, just
| + 262956 [m.fellinger@] # Though, i have to admit, i never had any need for this kind of
| | 262963 [dzwell@gm il] I like this idea, but I would make it more general (so you could use it
| | 262971 [sanobast-rub] If implemented this way, assert comes with a potential speed penalty.
| + 262967 [wieczo.yo@go] I am quite sure you're talking about Unit Testing. The PickAxe book
+ 262949 [wieczo.yo@go] I am not sure if you mean Unit Testing or Design by Contract. Ruby has
+ 263111 [john.carter@] I been around this particular block a few times and have come up with the simplest...
262943 [fugalh@zi ne] I'm toying with GEDCOM again, and trying to write out the YAML
262983 [dan@fl en ra] YAML will make an ID reference rather than inserting the object if it
+ 262984 [dan@fl en ra] [[0, [[1, [[2, [[3, [[4, ]]]]]]]]]]
+ 263009 [fugalh@zi ne] I thought of this, ufortunately this data is more like a doubly-linked
263010 [dan@fl en ra] Because there are links going up the tree as well as down?
263026 [fugalh@zi ne] Yes, exactly. Links from parent to child, and also from child to parent
finalizer not getting called
262944 [joshchia@gm ] The finalizer is not getting called in this code -- it just prints
+ 262950 [ed.odanow@wo] I used this example with Windows2000 and the same result. It works when
| 262966 [evanwebb@gm ] On Aug 1, 10:53 pm, "Wolfgang N?dasi-donner" <ed.oda...@wonado.de>
| + 262977 [ed.odanow@wo] Oh yes, this has to be overlook easily. Usually I don't care about the
| + 263053 [joshchia@gm ] I'm not familiar with all the nuances for blocks, but I only see that
| + 263057 [alex@bl ck e] The Ruby way is not to rely on a finalizer, but to define your setup and
| + 263058 [ed.odanow@wo] Blocks act as closures, which means, that variables not defined as block
+ 263114 [flori@ni e. ] If the answer is finalizer in Ruby, then it's very likely, that you're
263118 [flori@ni e. ] Ahmmm. Let's continue here: ...contain the value, perhaps
ordered hashes/ yaml?
262951 [lister@pi kl] ...
+ 262953 [vjoel@pa h. ] class Hash
| 262954 [hal9000@hy e] Do you really use that term that way? I wince when I read it. ;)
| 262957 [vjoel@pa h. ] Hm. Ruby-quiz: find a better term...
+ 262986 [transfire@gm] YAML has a secondary type called an omap. It is supported in the syck
| 263028 [vjoel@pa h. ] require 'yaml'
| 263130 [transfire@gm] Syck isn't 1.1 compliant (AFAIK) so you have a typo in your last
| 263146 [vjoel@pa h. ] Syck does load !!omap, but the resulting object doesn't behave very
| 263148 [transfire@gm] It's loading it as an unknown private type.
+ 263123 [ara.t.howard] enjoy.
How to call WebService writed by java?
262958 [liwenqiu@gm ] ...
263017 [tim.pease@gm] TwP
262959 [neha.chopra@] I am using Instant Rails 1.6
263019 [tim.pease@gm] Do you have a Rakefile in the directory where you ran your 'rake
YAML and DateTime
262969 [ pm@ub t. om] It seems that cannot store instances of DateTime, but instead stores them
361003 [jmrepetti@gm] There's a workarount you can do,
Sybase and ruby
262970 [vabb_z@ya oo] I am trying to configure Sybase and ruby in LINUX but not able to do
262982 [fwmailinglis] charset="us-ascii"
262997 [vabb_z@ya oo] Thanks for replying but I want to configure with SUSE linux 10 and ODBC
263004 [fwmailinglis] charset="us-ascii"
263178 [vabb_z@ya oo] Thanks a Lot Felix ...
262974 [shaiguitar@g] case number
+ 262976 [sepp2k@go gl] var=case number
+ 262978 [sanobast-rub] var = case ...
262979 [shaiguitar@g] ..quick reply (didn't last a minute)
263000 [phlip2005@gm] Or...
263007 [shaiguitar@g] nice! :)
+ 263018 [phlip2005@gm] D'OH!
| + 263037 [bsimmers@cm ] ...
| + 263047 [dblack@ru yp] Not all optimization is premature, and it's not the case that no
| 263050 [alex@bl ck e] They're only going to get more interesting in future, as we have more
+ 263045 [dblack@ru yp] Some quick benchmarking suggests that for small numbers of items
problem with rubygem
262975 [yin.wu@or ng] ruby-1.8.5-p2 and rubygem-0.9.4 no problem for their installation.
262981 [google@st mj] This means that gem can't resolve the name of a remote server, i. e.
262992 [yin.wu@or ng] Thank you very much for your help. I have installed the connection
262994 [google@st mj] What are the exact parameters you call gem with?
264086 [ronald.fisch] Did you try to click on the "download" link at this site, i.e. where
Re: ParseTree 2.0.0 Released
262988 [sanobast-rub] May I kindly ask if you could give an example for how to use
263119 [ryand-ruby@z] ParseTree is one way. You have to use ruby2ruby + eval to feed the
What does this warning actually mean?
262999 [ttmrichter@g] So, I'm trying my hand at metaprogramming and am finding this the result
263003 [robert.dober] ...
263013 [ttmrichter@g] This much I figured out for myself, Robert. ;) The problem is that I
263027 [robert.dober] Michael please post in raw text format, this reads terribly and can probably
Beginner's tutorial and poor attempt at classes
263011 [gabe@dr gf y] I just started with Ruby (yesterday actually). Have been reading the
263012 [dblack@ru yp] if (1..6) === value
+ 263016 [gabe@dr gf y] Thank you very much, these work a treat! I've got to now ask the
| + 263020 [stefano.croc] When ruby sees an operator, for instance a + b, it calls the corresponding
| + 263022 [olsonas@gm i] Gabriel -
| + 263023 [olsonas@gm i] Whoops! I should not be resetting the class variable inside initialize!
| + 263030 [gabe@dr gf y] WOW! What a reply! This has got to be the single best thing for Ruby
| 263212 [coder68@ya o] Gabriel Dragffy,
| 263242 [gabe@dr gf y] Thank you for your suggestion, Ilan, I'll certainly be more careful
+ 263214 [shortcutter@] Interesting that you do it that way. In the light of exception
+ 263241 [gabe@dr gf y] Have been rereading your example. Just wanted to ask why in the code
| 263245 [dblack@ru yp] The number= method does some data checking, and if all is well it sets
| 263269 [gabe@dr gf y] [...SNIP...]
| 263271 [dblack@ru yp] It's really just so the data filtering and checking will happen.
+ 263360 [gabe@dr gf y] and I just discovered yet another way of getting to the same place!!
263544 [pit.capitain] Gabe, your version should be more efficient, because it doesn't create
Bullet points on Ruby 1.8 vs. 1.9 language??
263014 [znmeb@ce ma ] Is there some list of "bullet points" on the major differences between
263015 [tim.pease@gm] Mauricio is keeping a running list of new features in 1.9 on his blog ...
[SUMMARY] Crossword Solver (#132)
263024 [james@gr yp ] Many of these solutions got pretty sluggish when run on large crosswords. The
net::http and caching files
263029 [shea@nu l. e] I would like to open a webpage, only if the page is newer than what I
+ 263031 [lionel-subsc] You don't use the last_modified value like that. You make a simple GET
| 263048 [shea@nu l. e] Just read what 'etag' is. Do I actually need mtime, if I have etag?
| 263049 [lionel-subsc] Depends on the server on the other side. Both have roughly the same
| 263062 [shea@nu l. e] I have just tried about 20 servers (random urls), and have not seen and
| 263088 [lionel-subsc] Of course google won't send you last_modified or etag headers they don't
+ 263033 [shea@nu l. e] It looks like Net::HTTP::Options might be what I want, just trying to