403027-404377

402820-405470 subjects 403211-403875

$SAFE variable in Ruby.
403027 [lists@ru y- ] The variable $SAFE determines Ruby's level of paranoia. Now it has 5
+ 403029 [shortcutter@] Do you mean "real world" scenarios?
| 403034 [lists@ru y- ] Yes i was looking for "real world" scenarios,so that i can get the core
+ 404377 [lists@ru y- ] Can anyone help me in my post here?

Is there any fatser gem which can do the webpage scrapping fatsest way
403038 [lists@ru y- ] I have need to do the webpage automation,here also wanted to know how to
403039 [echristopher] You have quite a few choices. It would narrow them down to know

can we read webpage gread data into an excel?
403041 [lists@ru y- ] I am using one third party web application, where in one pag all the
403106 [jgabrielygal] The easiest way is to use an HTML parser such as Nokogiri, and then

Any ideas why IRB would be different than running the code?
403042 [wbrisett@at ] I have a routine I use for converting hex, decimal, and binary values between
403048 [fluido@fl id] class String

Re: can we read webpage grid data into an excel?
403044 [lists@ru y- ] I recommend handing the table's HTML to Nokogiri and letting it do the

[ANN] rake-compiler 0.8.2 Released
403045 [luislavena@g] rake-compiler version 0.8.2 has been released!

[ANN] sqlite3 1.3.7 Released
403046 [luislavena@g] sqlite3 version 1.3.7 has been released!

what is the difference between a.map and a.map?
403049 [lists@ru y- ] I am confused with the working of a.map and a.map! on the array
403050 [fluido@fl id] $ ri Array#map

Array methods creating confusions as per their functionalities
403051 [lists@ru y- ] Can any one just elaborate how the below works in Ruby, by definition
+ 403053 [calvin.bornh] I don't want to be rude or anything, but haven't you read the
| 403055 [lists@ru y- ] I agree with your point, as I am a newbie so not that much confident on
+ 403054 [little.sprin] Try reading http://apidock.com/ruby/Array/zip etc.
| 403056 [lists@ru y- ] Wow nice docs you have provided! its too handy to understand as it
| 403057 [lists@ru y- ] to understand the ZIP method i used the below code,but getting an
+ 403058 [lists@ru y- ] My confusion or knowledge gap here is what the `frozen` means in Ruby
  + 403059 [matma.rex@gm] You can "freeze" most mutable objects (by calling #freeze) to make them immutable.
  | 403060 [lists@ru y- ] any small code, on your sentences,if you give,it would be better for understand with scenarios!
  + 403061 [stefano.croc] A frozen object is an object which can't be modified. You freeze an object

Re: what is the difference between a.map! and a.map?
403052 [lists@ru y- ] You'll find this symbol on quite a few methods in Ruby, in general there

How to take information from a text file and add them to an array
403062 [lists@ru y- ] to an array and check the array for a login verification process. Does
+ 403064 [stefano.croc] Well, File.read read the file and give you its contents stored in a string.
+ 403066 [lists@ru y- ] Exactly what you do depends on how your input is formatted, but say you
| 403070 [sto.mar@we .] names = File.read('names.txt').split(/\n/)
+ 403067 [lists@ru y- ] password1
| 403071 [sto.mar@we .] passwords = ['password', '12345', 'abcde']
+ 403072 [lists@ru y- ] So If I have a variable with a password in such as pswd = example.
| 403076 [tamouse.list] passwords = File.read("passwords.txt").split("\n")
+ 403077 [lists@ru y- ] If this is a username & password system then you'll want to pair them
+ 403084 [lists@ru y- ] Just to take this a bit further and give you a practical demonstration,
| 403095 [sto.mar@we .] <https://github.com/stomar/>
| 403101 [lists@ru y- ] Nice! I didn't know about that trick.
+ 403117 [lists@ru y- ] users_passwords = Hash[ File.foreach('input.txt').map { |line|

question about sockets
403073 [lists@ru y- ] i am new to Ruby.
+ 403074 [little.sprin] Try separating your headers with newlines, according to HTTP standard.
+ 403075 [lists@ru y- ] thank you very much.
+ 403078 [tamouse.list] headers = []
+ 403079 [lists@ru y- ] thank you very much !
  403080 [me@da id wd ] means return + newline. Windows's way of dictating the end of a line in
  403081 [jeremy@bo p.] ...
  + 403082 [me@da id wd ] Thank you for correcting my mistake. That is correct. My apologies.
  + 403103 [tamouse.list] Of particular importance to OP, HTTP protocol dictates that the header

Can anyone tell me the computational logic of Unpack() method of string?
403083 [lists@ru y- ] $ 'A'.unpack('b*')
+ 403085 [lists@ru y- ] Given the sort of questions you've been posting, I have to ask. Are you
| 403087 [lists@ru y- ] Yes, I know. but one thing none of the docs I found have an
| 403104 [tamouse.list] Maybe you should read the code?
| 403123 [shortcutter@] I'd start with the documentation and if something is not clear ask
+ 403876 [lists@ru y- ] Can anyone help me here to understand?
| 403881 [tony@ob ec f] What is it you don't understand exactly ?
| 403882 [lists@ru y- ] @Tony: Thank you very much!
+ 404090 [lists@ru y- ] Unpack decodes a string based on the format you specify and returns an
  404117 [tony@ob ec f] Yes, that's right.

uniq vs uniq!
403088 [rubyinfo@ap ] 1.8.7 :001 > [].uniq!
+ 403089 [mtczerwinski] Because
+ 403090 [rubytalk2dav] Why what?
| + 403092 [lists@ru y- ] What bad with you? why you posted your question with me? its not your
| | 403102 [rubyinfo@ap ] Arup --
| + 403093 [little.sprin] Awesome explanation!
|   403100 [rubytalk2dav] Oh, nothing much.  What bad with you?  ;-)
+ 403091 [lists@ru y- ] This was not my question, have you posted it with mine one by mistake or

How the equality check is being done in Ruby?
403094 [lists@ru y- ] I ran the below code to do some test on <=>,==,===,eql?,equal? I took 1
+ 403096 [lists@ru y- ] Someone's done a handy description of some common comparison operators
| 403097 [lists@ru y- ] Thanks for the link,most of the part going above the head! :( trying to
| 403099 [wbrisett@at ] operators
+ 403098 [toraritte@gm] "eql?" returns true if num and numeric are the same type and have equal values.

iconv will be deprecated
403105 [hawat.thufir] thufir@dur:~/ruby/nntp$
403107 [me@da id wd ] Its not a problem. Its a warning / notification.

attr_accessor question
403109 [edd.rossi@gm] I hope this isn't a too silly question, but: who respond_to? true at
403110 [stefano.croc] attr_accessor and similar are private methods of class Module. Because of
403111 [edd.rossi@gm] Thanks Stefano.

[SEC][ANN] Rack 1.1.5, a modular Ruby webserver interface
403112 [jftucker@gm ] Today we are proud to announce the release of Rack 1.1.5.

[SEC][ANN] Rack 1.2.7, a modular Ruby webserver interface
403113 [jftucker@gm ] Today we are proud to announce the release of Rack 1.2.7.

[SEC][ANN] Rack 1.3.9, a modular Ruby webserver interface
403114 [jftucker@gm ] Today we are proud to announce the release of Rack 1.3.9.

[SEC][ANN] Rack 1.4.4, a modular Ruby webserver interface
403115 [jftucker@gm ] Today we are proud to announce the release of Rack 1.4.4.

Garbage Collection and Fibers
403116 [lists@ru y- ] I've been having an issue with my program running slow at points where
+ 403118 [matma.rex@gm] You can't do any of that. Ruby has a stop-the-world mark-and-sweep garbage collector, which means that every time GC is called *everything* (all threads, fibers, whatever) has to stop executing while GC walks *all* of your objects (starting from constants, global variables and variables in active scopes) to mark them as used and then deallocates the rest.
+ 403119 [lists@ru y- ] Aha.  I realised that running it in a separate thread or fiber would
| + 403120 [fluido@fl id] I think this is the wisest option at your disposal. When a GC'ed
| + 403121 [flo@an er gr] Don't forget option X: If you don't need extensions that are fundamentally
|   403122 [shortcutter@] I would certainly try to find out why it's slow or GC has so much to
+ 403138 [lists@ru y- ] I have some silly preference against JRuby.  For some reason I don't
| + 403148 [shortcutter@] That isn't true.  The only difference between a for loop and an each
| + 403151 [tony.arcieri] Just curious, what gem were you using for this? There are a number of
|   + 403152 [lists@ru y- ] Why is it that MRI is inferior to JRuby?  You'd think something coded in
|   | 403154 [matma.rex@gm] Because Java's GC (which JRuby depends on), as well as its entire runtime, has had thousands of man-hours put into optimising it.
|   + 403268 [lists@ru y- ] If I use 'require' to bring in a jar file, and run the code from that,
+ 403150 [lists@ru y- ] At
| 403188 [shortcutter@] the author doesn't really track down the "relief" to the different
+ 403153 [lists@ru y- ] I think it was this gem: http://rubygems.org/gems/perlin_noise
  + 403190 [tony.arcieri] That's a pure Ruby gem so it's not surprising it's slower than the C
  | 403213 [lists@ru y- ] require 'java'
  | 403347 [headius@he d] You shouldn't have "java" in front of this. You might reference
  + 403348 [headius@he d] I'd like to see the benchmark you ran that was slower on JRuby with
    403361 [lists@ru y- ] I actually haven't given the full story, here.  The "perlin" noise

couldnt find win32ole
403124 [lists@ru y- ] I am trying to access MSaccess database in ruby, so i need to use
403125 [lists@ru y- ] If you installed Ruby on Windows you should already have win32ole. Can

Conversion of Ruby-code to c/c++ code :: URGENT Plz help
403127 [lists@ru y- ] If some-one have both the knowledge ..plz help me..  At least give me
+ 403128 [mbj@se ni .n] Homework?
+ 403129 [lists@ru y- ] No.. its for company-question .. i have to understand this code asap..
| + 403130 [fluido@fl id] Funny. A company dabbling with Morse code in the 21st century...
| | 403131 [lists@ru y- ] I just want to know the algorithm for the code... rest i'll do it..
| + 403132 [peterhickman] If you know neither Ruby or C++ then no one can help you. The job you are
|   403133 [lists@ru y- ] i know C++  but don't know the algorithm of morse-code
|   + 403135 [peterhickman] $ ruby morse.rb
|   + 403136 [peterhickman] So you also do not know how to use Google?
|   + 403137 [janicetr@fa ] Z.
+ 403134 [schang@wx .n] Is this a joke? My advice: read a Ruby book to get familiar with the

Installation query
403139 [lists@ru y- ] I'm new to Ruby and am enjoying it, but when I installed, I attempted to
+ 403140 [little.sprin] Install 'rbenv' and 'ruby-build' with Homebrew. After setting up rbenv, install ruby with 'rbenv install' command
+ 403141 [lists@ru y- ] Thanks, Alex. I'm not terribly unix literate and have tried to follow
| + 403142 [little.sprin] 'rbenv install --list' will show you ruby versions available for install.Pick one -- you will most likely want to 'ruby install 1.9.3-p362'.
| + 403143 [rob@ag le on] You are almost there. You need to tell `rbenv install` which version you =
+ 403145 [lists@ru y- ] Again, thanks to both - however it's still not working. I'll paste the
| 403146 [sophrinix@gm] That's your problem.
+ 403147 [lists@ru y- ] OK - I'm getting frustrated. I installed xcode command line tools (I
| 403157 [little.sprin] Stay cool. First, ensure that you have the required ruby version typing'rbenv versions' in the terminal.
+ 403159 [lists@ru y- ] OK, I'm cool, but still confused. I did as you said, Alex, but 'ruby -v'
| + 403160 [little.sprin] I never thought it would be so complicated ^)
| | 403162 [fluido@fl id] I know nothing about rbenv, but if you type
| + 403193 [zlx.star@gm ] ...
+ 403161 [lists@ru y- ] But how do I ensure that my .bashrc contains that code? Should there be
| 403163 [little.sprin] $ open ~/.bashrc
+ 403164 [lists@ru y- ] Alex, I found the .bashrc file and included 'eval "$(rbenv init -)"'',
+ 403177 [lists@ru y- ] This is perhaps not totally resolved. Though ruby -v says 1.9, I'm not
| 403178 [fluido@fl id] Yup. There is a global constant calld RUBY_VERSION. If you write a
+ 403192 [lists@ru y- ] The puts RUBY_VERSION command was helpful and revealed that in fact I

Where is the methods method defined ?
403155 [lists@ru y- ] just curious where can I find definition of methods method ?
+ 403158 [lists@ru y- ] you are currently asking for the method of the class BasicObject.
| 403165 [lists@ru y- ] Ok, that would explain 'methods' method really comes from Kernel but
| + 403260 [ryand-ruby@z] It is probably just a bit confused because the method definition is =
| + 403262 [james.britt@] James
|   403266 [little.sprin] It does come from Kernel module.
+ 403319 [lists@ru y- ] Thanks for the replies. It's defined, a bit counter-intuitively, in

[ANN] flickr_cli 0.2.0 released
403156 [beholdthepan] flickr_cli is a command line tool for exploring your flickr stream, and the

Re: What about CouchDB?
403166 [eliezer@ng e] Thanks robert,

Ruby + Selenium: Reuse open browser session [HELP]
403167 [lists@ru y- ] People,
+ 403170 [lists@ru y- ] Are you certain that you can't use a class to contain these methods?
+ 403175 [lists@ru y- ] Tanks Joel, but I need examples in Ruby.
+ 403184 [lists@ru y- ] Play around with IRB and see what you can do with it.
+ 403502 [lists@ru y- ] If you're using multiple scripts you should be using "require" or

RDOC nodoc tag
403171 [lists@ru y- ] Hey Guys,
+ 403174 [matma.rex@gm] I think it's #:doc:.
+ 403179 [ryand-ruby@z] ...
| 403181 [sbagdat@gm i] simply using # :doc
+ 403182 [lists@ru y- ] #:doc: seems to work.
+ 403229 [quintus@qu n] This is incorrect usage of the :nodoc: directive. It is meant to be

Redom: Distributed object based server-centric user-friendly web application framework
403172 [ko1@at ot ne] Let me introduce a new web-application framework "Redom" by Eki Ko. He
+ 403197 [tamouse.list] I deem Redom fully buzzword-compliant. :)
+ 403198 [alec.taylor6] Nice,
| 403210 [ko1@at ot ne] GWT (and maybe Pyjamas) compiles some language to javascript.
+ 403312 [lists@ru y- ] I am running the redom examples (via rackup). The http-server is running
  403313 [lists@ru y- ] Solved by running the redom command separately. Perhaps it was in the
  403360 [ko1@at ot ne] Thank you for your trying.

Error - ActiveRecord is not missing constant Serialization!
403173 [lists@ru y- ] I was using Ruby 1.8.7 and Rails 3.0.3 in my app on Heroku till I got a

GUI for 'gem' command
403176 [lists@ru y- ] I'm searching to see if someone has made a desktop app/GUI for the gem

gem suggestions for text to bitmap
403180 [wbrisett@at ] There are several gems that look I might be able to use, but I'm wondering if
+ 403183 [ryand-ruby@z] wondering if=20
+ 403202 [janicetr@fa ] You should try the GD Graphics Library

regex hostnames?
403185 [lists@ru y- ] Not versed in regex, hopefully someone can help me out.
403187 [jgabrielygal] So you want to remove everything up to the first period?
403189 [lists@ru y- ] Shouldn't that be s[/\..*/,0] or s[/\..*/] ?
+ 403191 [matthew@ke w] s[/\.(.*)/,1]
| 403201 [jgabrielygal] Exactly, that was what I meant to write...
+ 403200 [jgabrielygal] 1.9.2p290 :003 > s[/\.(.*)/,1]

Getting a single hash from a row in a MySQL query.
403186 [ken@jo s. rg] find myself first pulling all matching rows from my select, then
403203 [lists@ru y- ] results.each do |row|

Ruby Threads and Shoes
403194 [lists@ru y- ] TL;DR: How do you pass execution from within a PTY.spawn block back to
403196 [chris.hulan@] Did you see this?

compiling ruby with openssl 1.0.1c fails
403195 [lists@ru y- ] I need help in compiling Ruby 1.9.3 with openssl1.0.1c. I had compiled
403199 [fluido@fl id] I have never had any exposure to Solaris, but... Are you sure that

RDoc and multiple attr_accessor's
403204 [lists@ru y- ] Sorry, I have searched, and its a trivial question which I just can't
403257 [lists@ru y- ] So I've had a browse over source code on google and can't find an

Escaped backslashes in input strings - newbie question
403205 [jrs.idx@nt w] I am trying to find a way of removing escaped characters in input
+ 403206 [toraritte@gm] Check out Regexp.escape ->
+ 403207 [shortcutter@] irb(main):001:0> s = 'a\\bc'
+ 403208 [alexandermcm] ...
  + 403217 [jrs.idx@nt w] Escaped backslashes in input strings - newbie question
  | 403226 [shortcutter@] I don't think so.  Instead of providing a sample in a language I don't
  | 403227 [jrs.idx@nt w] Escaped backslashes in input strings - newbie question
  | 403232 [shortcutter@] But what's actually not working?
  | 403237 [jrs.idx@nt w] Escaped backslashes in input strings - newbie question
  | + 403238 [fluido@fl id] That's because, in order to obtain the string you want to obtain, you
  | | 403248 [hassan.schro] Which is because the string is being interpreted due to being
  | + 403239 [jgabrielygal] 1.9.2p290 :002 > "\b".length
  + 403221 [jrs.idx@nt w] Escaped backslashes in input strings - newbie question

Error: File not found.
403209 [lists@ru y- ] File not found. Even though I have placed it in the correct location. I
+ 403212 [lists@ru y- ] Also the culprate.txt file is placed in
+ 403214 [atma@co va e] file = File.join(File.dirname(__FILE__), 'dir1', 'dir2', 'file.txt')
+ 403216 [lists@ru y- ] Thanks man! Ive have a look at it now :)
+ 403219 [lists@ru y- ] Still not working. I understand it brings up the text file directory but
| 403220 [wbrisett@at ] Can anybody read the contents in that directory? Almost sounds like there is
| 403222 [jeremy@bo p.] Another possibility is that the relative file path being used in the
+ 403223 [hassan.schro] Ignoring all the other issues with your code, the likelihood is that
+ 403243 [lists@ru y- ] to get it working by simply changing the way the File.open code was
threads.html
top