322869-323404

322631-332245 subjects 323086-325142

^ Ruby methods and Properties
322869 [talibhn gmai] Dear Experts,
+ 322870 [einarmagnus ] I really liked this site. Thank you whoever it was that posted it here
+ 322872 [b.candler po] There is built-in help: just type ri methodname at the shell prompt, or

^ [ANN] httpclient 2.1.3-RC
322871 [nakahiro gma] I'm working on releasing httpclient/2.1.3.  'httpclient' gives
322934 [nakahiro gma] I'm doing a little benchmark testing.  Let me know if you are

^ Unique values in hash?
322873 [vaqas.ashraf] I have a hash that contains duplicate data, for example, :username =>
+ 322874 [shortcutter ] irb(main):001:0> {:foo=>1,:bar=>1}.values.uniq
| 322882 [dblack rubyp] hash.invert.keys   # :-)
+ 322875 [rupert rupes] hash.map { |k,v| v }.uniq.each { |name| puts name }
+ 322879 [dandiebolt y] h=Hash[*%w(a alex b mary c alex).flatten]

^ URI path is not taking parameters
322878 [vaqas.ashraf] myurl =
+ 322880 [vaqas.ashraf] actually...
+ 322889 [hassan.schro] Looks right per the URI doc...
  322900 [vaqas.ashraf] Thanks :)

^ implementing python's os.walk
322881 [bradv curmud] I seem to be having some difficulty creating a version of python's
+ 322890 [hgs dmu.ac.u] You can have generators in Ruby
+ 322895 [b.candler po] The normal 'ruby way' to do this would be as an object which *yields*
+ 322897 [shyouhei rub] You should really know how to use Ruby's stdlib named "find".
+ 322898 [shortcutter ] You have a recursive algorithm here but you want each call of the
  322937 [bradv curmud] Many thanks for the suggestions.

^ Validation
322886 [cyrus_dev ho] any one know how to order validation messages in Rails
322893 [dusty.doris ] You can ask for specific error messages.  I usually do that right
322939 [cyrus_dev ho] thanks for your reply.
322948 [dusty.doris ] The errors are added to the model in the order they are run in

^ Blur on transparent images with RMagick
322894 [augustlillea] Let's start with some code. http://pastie.org/340438 . If you run it
322924 [rmagick gmai] @image = @image.blur_channel(0,3, Magick::AllChannels)

^ headers problem installing hpricot
322901 [kenneth.m.mc] I just tried (on OS X 10.5) an install of hpricot, and was told that
322902 [james graypr] You need to install Apple's Developer Tools (Xcode).  Details can be

^ RSay GEM (rtranslate clone)
322904 [etozzato gma] I was in the mood for packing my first gem for educational purpose and I

^ Persistent Objects with Ruby - simple beginning
322905 [piksNOSeliPA] Object persistence, I want it, without SQL or other schemes that could be
+ 322907 [vjoel path.b] It might be interesting to compare your ideas with fsdb[1]. It does have
+ 322917 [b.candler po] Have you looked at Madeleine?

^ Ruby 1.8.6 - normal behavior ?
322910 [Aldric Giaco] I don't know enough to really test this but I came across a funny
322918 [micathom gma] Entry is a hash I presume?
322920 [Aldric Giaco] Entry is a very big hash and I use those values later - if I don't run
+ 322925 [michael.c.li] If the code you posted is really the only relevant code and entry is a
| 323055 [Aldric Giaco] Just in case.. Here is the whole loop. Please forgive the lack of
+ 322926 [micathom gma] Crash as in fatal error dump crash?

^ How to cycle through an instance
322913 [tom999 gmx.n] I'm sorry for this noob question (but at least it must be a quick one
+ 322915 [b.candler po] Depends on what ORM you are using.
| 322919 [tom999 gmx.n] Thanks a lot !
+ 322921 [dejan.dimic ] @student =3D Student.find(params[:id])
  322956 [tom999 gmx.n] Cool, thanks a bunch!

^ [RubyCocoa] how is validateValue:forKey:error: supported?
322929 [chromatophor] so how does one do kvc validation in rubycocoa?

^ about Float
322930 [kdream95 gme] a = 1333.3339999999964
+ 322931 [chromatophor] => "1.680"
+ 323119 [uzimonkey gm] Comparing floating point numbers is usually not a very good idea.
+ 323128 [gregory.t.br] Technical Blaag at: http://blog.majesticseacreature.com
  323154 [gwtmp01 mac.] That is the document I usually send people to also.
  323162 [chromatophor] and just in case you need further convincing, this is the scariest
  + 323198 [b.candler po] $ bc
  | 323202 [michael.c.li] When I use BigDecimal all the way through and keep things clean in
  | 323210 [b.candler po] You're right, it works if you explicitly promote some of the constants
  + 323404 [steve REMOVE] The example you give is pretty scary, but there's much scarier. You don't

^ Ruby Tk (make available of a single pointer(marker) of TkText)
322932 [jykim altiba] Now, I am trying to make simple Diff-viewer by using Ruby Tk.
322960 [fox nscl.msu] I don't know enough about Ruby to be sure, but one method we Tcl/Tk

^ changing Textmate
322933 [edvelez.g gm] This search pattern looks for "=" sign on a document, how do I change it

^ Unable to locate config file.
322935 [navouri gmai] I have a gemmed command line utility that requires a configuration
322944 [dusty.doris ] Try

^ Kaazing Founder Jonas Jacobi to speak on HTML 5, Comet, WebSockets,  Future of the Web
322938 [saltmarch200] Kaazing Founder Jonas Jacobi to speak on HTML 5, Comet, WebSockets,

^ ruby way of dumping file
322941 [chezball gma] Can someone give me a cleaner, more rubyesque (even correct) way of printing
+ 322943 [higgs.bozo g] print File.read(ARGV.first)[0...20]
| 322945 [einarmagnus ] Doesn't that read the entire file before extracting the first 20
| 322962 [b.candler po] In Ruby, I believe it's guaranteed to read 20 bytes, from both files and
+ 322947 [botp delmont] # Can someone give me a cleaner, more rubyesque (even correct)=20

^ function discovery
322942 [chezball gma] I am curious if there is a programatic way to list all methods of a class.
+ 322946 [einarmagnus ] f.methods
| 322963 [b.candler po] Object.constants.grep(/RUBY/)
+ 322977 [phlip2005 gm] I express no curiosity about the illegal parts! (-;
  322978 [shortcutter ] You do not need to construct an instance of Object - you can as well use

^ Finding out in-memory size of an email
322949 [elekktretter] I have a script that executes sendmail binary like this
322961 [b.candler po] Not sure how this relates to Ruby.

^ A question about ruby array
322950 [youhaodeyi g] I read some ruby examples and found there is a syntax I don't
+ 322952 [mzilenas gma] there are Hashes and Arrays. They are different.
+ 322958 [dblack rubyp] It's actually hashes, not arrays, that use this syntax (see other
  323006 [youhaodeyi g] Ok I understand,

^ Your word frequency calculator?
322951 [pikNOUseli w] Word frequency calculator is one basic tool. I find it an interesting,
+ 322996 [caduceass gm] With 1.8.7 and s being data (includes apostrophes for words like "don't")...
+ 323011 [dblack rubyp] That's a dangerous technique, because str.downcase! is nil if there's

^ About qt4-ruby
322954 [magicloud.ma] Today I compiled qt4-ruby in my rhel5 box. And have a little test.
322964 [stefano.croc] It's smoke which doesn't have the symbol, not qt itself, so you'll need to
323013 [magicloud.ma] So may I know how to compile smoke? I read smoke/README, and ran the
323038 [stefano.croc] cd qt
323120 [magicloud.ma] I used kdebindings instead of qt4-ruby, everything is fine now.

^ Block execution of script while same script is already running
322957 [MrBanabas go] Bob is starting script my_test.rb which runs a over an hour...
+ 322959 [shortcutter ] There are solutions for this in the archives of this list.  You can
+ 322970 [sean.ohalpin] Daniel Berger suggested the following technique (see thread starting

^ using count += 1, code won't change value in output
322965 [mmc_collins ] This is supposed to count every line in a file that contails the string
+ 322966 [janfri.rubyf] if line =~ /0004343/ then
+ 322974 [mark thomasz] f1.grep(/0004343/).size

^ Ruby 1.9.0 crash on Kubuntu Hardy Heron
322967 [amberarrow y] ======================
322968 [b.candler po] Your program works fine for me on 1.9.1-preview2, under Ubuntu Hardy.

^ [RubyCocoa] C pointers, and documentation
322971 [chromatophor] how are C pointers handled on the rubycocoa side?
323061 [marick visib] There's a class called ObjcPtr that's used to translate to/from such

^ Q: HOWTO: install a gem using rake?
322973 [onepoint sta] Is there a  standard way to write  a gem install task if  you build it
322975 [Aldric Giaco] Surrounding a command with backticks sends it out to the OS.
322976 [onepoint sta] Sorry, I  didn't make it  clear that this  "sh" is a Rake  method that

^ Ruby based Discussion forum
322979 [email2sanjay] I'm looking for a ruby based discussion forum(BB) software to
+ 323028 [rogerpack200] there's ruby-forum itself.
+ 323056 [lyle lylejoh] Beast (http://beast.caboo.se/).
  323102 [lojicdotcom ] Not sure if there's simply a transient issue right now, but it's *really* slow.

^ [ANN] JRuby 1.1.6 Released
322982 [Thomas.Enebo] The JRuby community is pleased to announce the release of JRuby 1.1.6

^ Re: gsub("\\", "\\\\") seems unintuitive
322983 [joe notsleep] I stumbled onto this thread trying to figure out a similar problem...
322984 [joe notsleep] Dangit, I didn't mean to post the above message :)
+ 322985 [damnbigman g] puts "joe.com".gsub(/\./, "\\\\.")
+ 322994 [caduceass gm] You are looking at a string with escaping characters (i.e. what it
  323076 [joe notsleep] Okay, those last two explanations helped clear up my confusion.  Thanks.

^ Hopefully simple regex
322986 [stephen.odon] I am trying to make a regex that will capture strings that look like
+ 322988 [stephen.odon] /^(?:.*\s+(@{1,1}\w+)|(@{1,1}\w+))/
+ 322989 [dblack rubyp] @regex = /(?:^|\s)(@\w+)/
  322990 [stephen.odon] Perfect - I didn't know you could (or even think to try) putting the
  323052 [richard.conr] regular expressions. Highly recommended.

^ Using ruby hash on array
322987 [stuart.clark] I would like to process some data from an array and using hash to
+ 322991 [default spir] I don't know if I got you right...
| 323066 [stuart.clark] Sorry for not being clear. I am actually parsing data from Windows event
+ 323039 [shortcutter ] You do not say whether the format is delimited or fixed width.
| 323067 [stuart.clark] Sorry for not being clear. I am actually parsing data from Windows event
| 323069 [shortcutter ] Did you actually look at my reply?  You then would probably not have
| 323098 [stuart.clark] Sorry I was getting to replying to you then got called off in a hurry. I
| + 323103 [shortcutter ] I define a class holding the data you want to parse from the file via
| + 323105 [caduceass gm] (leave off the extra : after b  :-)
|   323244 [stuart.clark] Thanks for your help Todd. I have gone for a different approach which I
|   323248 [tim burlyhos] It's just formatting/padding.  It will right adjust the output on the
|   323291 [shevegen lin] The format delimiters are quite common in the whole "programming world".
+ 323049 [dandiebolt y] I am having a difficult time understanding what you are asking, but perhaps=
  323065 [stuart.clark] Sorry for not being clear. I am actually parsing data from Windows event

^ Hpricot problem with free text
322992 [tavarezjonat] data from a website using the Hpricot library.I am doing this: links =
+ 322995 [dandiebolt y] require 'hpricot'
+ 322999 [swittenk yah] I haven't used Hpricot much, but you may want to dig through the API
  323004 [tavarezjonat] Thanks for the idea but I have already try innerHTML but is returning

^ zlib.so (LoadError)
322993 [mmadrid99 gm] I'm getting the error below when trying to install ruby gems on Windows
+ 322998 [swittenk yah] Are you compiling from source? I've never tried to get Ruby running
+ 323002 [abc3def gmai] You need the zlib.dll.
  323014 [mmadrid99 gm] Tks Alex.

^ Net::SSH - kick off background job
322997 [swittenk yah] Does anyone know of a way to tell Net::SSH to start running a script but
323045 [b.candler po] nohup somecommand someargs &
323063 [doug dseifer] nohup somecommand someargs > /tmp/out.log < /dev/null &
+ 323068 [Rob AgileCon] If your platform has setsid (set session id), that is a better option
| 323131 [swittenk yah] Cool, thank you very much! I haven't had a chance to try this out yet,
| 323132 [b.candler po] But I thought you were using Net::SSH? In that case, the ssh me@box part
+ 323073 [b.candler po] ... which nohup does anyway (according to its manpage, under Ubuntu
  323221 [doug dseifer] -Doug Seifert

^ what's wrong with my method and regular expression?
323000 [aditya15417 ] The code is
323007 [chris.hulan ] You might want to play with your regex on Rubular (http://
323008 [aditya15417 ] the code should work for both, if there's no http:// then it should
323010 [aditya15417 ] anyway thanks for the rubular link I was able to fix the code using

^ Help with Hpricot and collect
323003 [tavarezjonat] data from a website using the Hpricot library.I am doing this: links =
323043 [dandiebolt y] require 'hpricot'

^ Error list
323009 [steinfal gma] I am a Ruby newbie.  In my learning attempts, I often run across
323012 [phasis gmail] Refer to http://rubylearning.com/satishtalim/ruby_exceptions.html

^ Writing a good spec.
323015 [navouri gmai] So I have a piece of code that I didn't write a spec for, and now rcov
323018 [ara.t.howard] first off, specdoc needs to be parameterizable - for instance
323026 [navouri gmai] Thanks, I'll swing that in there!

^ Array problem
323016 [tavarezjonat] array = [ "manyThings.mp3", "myLike.gif", "moreCoco.bmp",
+ 323017 [swittenk yah] array.reject! {|elem| elem.split(".").last != "bmp"}
| + 323020 [swittenk yah] And just another note: generally, for transforming and/or iterating over
| + 323023 [chromatophor] you might also want to anchor your regex
+ 323019 [chezball gma] array.delete_if { |elem| not elem =~ /.bmp/i }
| 323022 [chezball gma] array.delete_if { |elem| not elem =~ /.bmp$/i }
| 323025 [tim burlyhos] Also, remember that . is any character, whereas \. is just . for the
| 323027 [chezball gma] Arg... regex...I am new to them. ;-) You are right, of course.
| 323029 [theyojimbo g] if you are like me an ignorant of regex, you could try this
| 323032 [joshnabbott ] array.select { |item| item =~ /\.bmp/ }
+ 323021 [scott therei] See Array#select
| 323046 [dandiebolt y] array.grep /bmp$/
+ 323041 [sepp2k googl] array.grep(/\.bmp$/)

^ [ANN] win32-security 0.1.0
323024 [djberg96 gma] The Win32Utils Team is happy to announce the first release of the win32-security

^ Define objects from classes in different files
323034 [jason.lillyw] Could someone help me with this little problem?
+ 323035 [jason.lillyw] I understand that I could do
+ 323037 [stefano.croc] I'm not sure I understand correctly what you mean. In ruby, you can re-open a
  323083 [jason.lillyw] I didn't know you could re-open classes like that. I've done this in

^ rake command to drop a table using migration file
323036 [kumar.anul g] Please send me the information regarding how to drop a table using

^ JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with  Ruby
323040 [press.saltma] JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with

^ JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with  Ruby
323042 [press.saltma] JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with

^ JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with  Ruby
323044 [press.saltma] JRuby Co-Developer to conduct Workshop on JRuby, Testing Java with

^ ruby to create GUI
323047 [limhuisian h] i already installed ruby one-click installer and would like to create
323048 [aff28 delete] If you've installed one-click Ruby, you already have FxRuby

^ New Version of IBM_DB Rails Adapter/Driver for IBM DataServers now  available
323051 [praveendevar] IBM_DB 1.0.1 gem refresh is now available. To download the new version

^ Problem converting a System Time to DateTime
323053 [darklingza g] I am new to Ruby and working on a project which needs to read a
323054 [darklingza g] Of course once I have clicked send, I find the solution imediately.

^ Getting test method names when getting output
323057 [jona.hunt777] When I run a test file (e.g., ruby test_user.rb), I get the test
+ 323062 [djberg96 gma] gem install turn
+ 323071 [phlip2005 gm] ruby user_test.rb -v

^ hash.each and hash.each_pair
323059 [jona.hunt777] I looked at RDoc documentation.
+ 323072 [shortcutter ] I do not care.
+ 323206 [overlord gmx] ach_pair„© is the better name for what it's doing and „µeach„© is a standard

^ Daemons lib not dong much?...
323060 [s_ayalon hot] in a mysql database. The file to monitor the changes works fine when run

^ create delay loop in ruby?
323064 [limhuisian h] i am trying to run an executable file(say a.exe) which will produce a
323070 [shortcutter ] Just invoke the process synchronously, e.g. via "system".

^ Get Status Code of URL
323075 [desingurajan] url = URI.parse("http://www.google.com/")
323081 [scott therei] require 'net/http'
323084 [desingurajan] Thank you
323113 [desingurajan] May be helpful, Only requesting header

^ mtime - search directory for modified time
323077 [mmc_collins ] I am trying to extract an exact filename so that I can use mtime method.
323100 [perfectly.no] You aren't using anything from the above three libraries,

^ Regular exressions and arguments
323079 [ukbell gmail] This should be (and probably will be) a simple answer, but if I have the
323080 [ukbell gmail] Should have just waited a little longer... figured it out... needed to
323082 [jgabrielygal] You can also use the regex literal, but you need to lose the double quotes.

^ [ANN] Ruby and Rails supported on 10gen
323085 [jim.menard g] It's official: the 10gen open source cloud computing platform
+ 323114 [charles.nutt] I hope we can help you upgrade to JRuby 1.1.6 :) Much faster for many
| 323137 [jim.menard g] Thanks. I briefly tried upgrading to JRuby 1.1.5, but ran across some
| 323145 [charles.nutt] We have hopefully not broken any methods on RubyArray or RubyHash that
| 323151 [jim.menard g] The mods to my RubyArray and RubyHash subclasses were pretty
| 323157 [charles.nutt] We should probably talk a bit more about how you're using the core JRuby
| 323163 [jim.menard g] Charles,
| 323164 [jim.menard g] By "the source code", I mean the source code to the 10gen app server
+ 323231 [znmeb cesmai] Am I the only one who thinks "supports Rails" and "does not yet include
  323239 [jim.menard g] Actually, you can run Rails without ActiveRecord just fine. Rails has
  323240 [jim.menard g] Oops. That should be http://github.com/jimm/10gen-rorob/tree
threads.html
top