400537-401243

400347-400755 subjects 400784-401105

Re: JRuby 1.7.0 Released
400537 [lists@ru y- ] Thanks for a quality release. JRuby is my "go to ruby" for quite awhile

watir-load-tester and hash-differ
400542 [lists@ru y- ] Hey Guys,

watir-load-tester and hash-differ
400543 [lists@ru y- ] Hey Guys,

How can I set body for Net::HTTPResponse
400550 [robert.mitwi] I tried to setup body for Net::HTTPResponse in my test code.
400554 [   ar@le .m ] From my reading of net/http/response.rb, there's not going to be a straightforward way for you to do this.
400555 [   ar@le .m ] (And silly me, you can use WebMock without RSpec. That may be the best way forward?)

Dynamically creating subclasses
400551 [lists@ru y- ] I have to dynamically create a number of classes with different names.
+ 400552 [   ar@le .m ] How about this?
+ 400553 [fxn@ha hr f.] I have to dynamically create a number of classes with different names.
+ 400558 [lists@ru y- ] Thanks to Arlen andXavier,
  400572 [shortcutter@] $ ruby19 -ce 'class = Class.new(String)'

Calling a method foo() or an object foo.method_call_here - both
400556 [lists@ru y- ] I have a method call foo.
+ 400557 [lists@ru y- ] to be honest, I don't think this idea of using global methods as
+ 400559 [lists@ru y- ] Your example unfortunately requires the leading name
| + 400560 [shortcutter@] But you cannot use "foo" to denote the object and invoke the method at
| | 400562 [shortcutter@] f = Function.new
| | 400563 [lists@ru y- ] I already suggested a Function class, but he doesn't want to use a
| + 400561 [lists@ru y- ] Well, you cannot have all at once. If you don't want to change the
+ 400566 [lists@ru y- ] f.method_name()
| + 400568 [shortcutter@] But you can at least have
| + 400573 [lists@ru y- ] I think you might be using the wrong language. If you want to program
+ 400776 [lists@ru y- ] Now you advocate to use another language?
| 400778 [lists@ru y- ] This is not my opionion in the sense of "I like red more than blue".
+ 400783 [lists@ru y- ] I think it will be simpler if you could change

Is there a better way to invoke methods?
400565 [caduceass@gm] I'm writing a simple script and need to shoot off methods based on
400569 [shortcutter@] Another approach would be to replace the symbols in the Hash by
400589 [caduceass@gm] Ideal. Thank you.

Issue in reading excel using Parseexcel
400567 [lists@ru y- ] I am new to Ruby. I am trying to read an excel (xls) filr using the
+ 400570 [chris.hulan@] Here you are setting the 'temp' var to refer to the string
+ 400571 [lists@ru y- ] temp.push cell
  400591 [lists@ru y- ] Thanks @Joel and @Chris
  400593 [sto.mar@we .] No.
  400594 [lists@ru y- ] Thanks for the clarification.

Ruby & Java vs JRuby
400576 [lists@ru y- ] My team has been doing Java for a long time. We are switching to Ruby.
+ 400577 [ryand-ruby@z] certain
+ 400578 [marco-oweber] If you only evaluate Ruby vs Java you missed Scala. So your comparison
+ 400579 [sduncan@we a] I have no clue whatsoever about rails, but we have had jruby based
+ 400580 [mcorino@re e] You might have been better of asking this question on a JRuby mailing
+ 400583 [stu@ru yp og] What are the limitations which you are referring to.
+ 400590 [headius@he d] Full disclosure...I have a hand in JRuby.
+ 400597 [shortcutter@] <disclaimer>I will repeat what others have said already but I thought

Trying to convert some configuration files to a different output
400581 [lists@ru y- ] How you doing? I'm trying to make my life easier in translating some
+ 400586 [lists@ru y- ] Well you seem to have quite a few changes in there. Have you looked into
+ 400596 [lists@ru y- ] =begin

Googlebot- How to generate a 404 error status after a if statement
400582 [lists@ru y- ] case. Googlebot try any combination of parameters. It still tries to
+ 400584 [hassan.schro] response.status= 404
| 400600 [lists@ru y- ] class StoreController < ApplicationController
| 400603 [hassan.schro] Uh, well. That won't work if you're doing a redirect; "redirect" means
+ 400633 [lists@ru y- ] not in the controller but in the rhtml file, as I dont well know how to
  400637 [hassan.schro] def whatever

[BUG] undefined method `closed?' for nil:NilClass
400598 [robert.mitwi] When I try to run one of my rake where I read body from my response,
400639 [jam@ja an be] On 25 Oct 2012, at 04:05, Robert Mitwicki <robert.mitwicki@fxitech.com> wrot=
400728 [robert.mitwi] I understand that, but I do not know exactly when and why @socket is

Question for JRuby team
400599 [lists@ru y- ] Sometimes back I've read that JRUby team is also maintaining RubyOnRails
+ 400640 [jam@ja an be] Try asking on the jruby mailing list. I'd give you a link but I am offline r=
| 400641 [tony.arcieri] You can also ask Charlie Nutter, the project lead on Twitter directly. He's
+ 401233 [headius@he d] Just to close the loop...

Gems install path
400601 [lists@ru y- ] Tell me, please, how can I change subj? I can't find any config file for
400611 [ryand-ruby@z] GEM_HOME=xxx gem install minitest

Net::FTP and UTF-8 encoding
400605 [pablasso@gm ] Hey there,
400606 [matma.rex@gm] Is the system encoding the same on your computer and the server? How
400608 [pablasso@gm ] mmm I was looking at the names just with transmit.app, but now that you mention it, it seems to be fine looking at them with the ftp command.

bit count or bit set
400615 [charleshixsn] In Ruby1.9 is there any good way to count the number of on bits in an
+ 400617 [matma.rex@gm] number.to_s(2).count('1')? I'm not sure how fast this is going to be,
| 400622 [charleshixsn] Thank you.  I expect that it would be faster than a loop in the Ruby
+ 400623 [eule@sp ce c] Hei Charles,
  400635 [charleshixsn] Right now I'm trying to do the simple optimizations that happen while
  + 400636 [jgabrielygal] I haven't used any, but you might try some of them.
  + 401232 [headius@he d] JRuby handles unicode (and other encodings) the same way MRI does. We
    401243 [charleshixsn] Thank you.  I misunderstood.

Creating a pointer to SAFEARRAY(BSTR) for COM object communication
400626 [lists@ru y- ] I have a hardware driver in DLL format that I would like to invoke from
+ 400631 [masaki.suket] How about Array of string?
+ 400813 [lists@ru y- ] Unfortunately no success.

[ANN] kcar 0.4.0 - bytestream to Rack response converter
400627 [normalperson] kcar features an HTTP parser that will convert a bytestream into a

[ANN] ruby_parser 3.0.0.a10 Released
400628 [ryand-ruby@z] ruby_parser version 3.0.0.a10 has been released!

Ruby and compliance
400629 [lists@ru y- ] I'm trying to potentially have Ruby distributed on an embedded system.
400630 [lists@ru y- ] Take a look at this: http://phrogz.net/ProgrammingRuby/taint.html

[ANN] Tork 19.0.1 (test with fork)
400638 [sunaku@gm il] 1. Absorbs test execution overhead into a master process.

gem_original_require feed_tools (MissingSourceFile)
400642 [lists@ru y- ] ruby -1.8.7

Managine Hoe gem dependencies
400644 [lists@ru y- ] # -*- ruby -*-
+ 400649 [ryand-ruby@z] % ri Hoe.dependency
+ 400672 [lists@ru y- ] Thanks!

Newbie, questions about === expression
400645 [yueyoum@gm i] I'm learning ruby this days.
+ 400646 [yueyoum@gm i] irb(main):195:0> (1..10) === 1
+ 400647 [stefano.croc] (1..10) === 1

packetfu, manipulating packets on the wire
400648 [lists@ru y- ] i would like to modify packets on the wire

OpenSSL ECDSA public key from private
400650 [uzleepito@gm] Could anybody please tell me how can I generate a public key from
+ 400651 [fluido@fl id] I have never done this myself before , but I was curious, and gave it
| 400654 [uzleepito@gm] Thanks Carlo, but it's not what I was looking for.  I know about
| 400656 [fluido@fl id] I had a look at the ruby code. #generate_key just calls openssl
| 400660 [uzleepito@gm] Much better, but it's still not finished...  ;-)
| 400669 [fluido@fl id] These mappings are generally done with quite a lot of care. Indeed,
| 400671 [uzleepito@gm] I'm sure I made a mistake but for me this script does not work.  The
| + 400673 [fluido@fl id] Indeed... I get
| + 400678 [tony.arcieri] I ran into this same problem. #mul is only available on the absolute latest
+ 400657 [rubytalk2dav] I haven't looked into how to do this in Ruby, but at least with the
  400658 [uzleepito@gm] I haven't looked into how to do this in Ruby, but at least with the

#encode and (pre/de)composed characters
400652 [rubyhacker@g] Why does encode to UTF-8 (in at least this one case) appear to favor a
400655 [matma.rex@gm] It doesn't. UTF-8 just needs two bytes to encode this character.
400665 [rubyhacker@g] Ahh, of course, I see now. Thank you.

Newbie Help: findMatchingCallableForArgs error
400662 [lists@ru y- ] I'm unable to get a simple ruby script to work that makes use of a Java
400663 [lists@ru y- ] Sorry, meant to post that to the JRuby forum. Please disregard.

When to use Ruby DelegateClass instead of SimpleDelegator?
400668 [lists@ru y- ] I am mostly re-posting my question from SO, because i think it can get

RVM and ruby SSLv2 support
400670 [lists@ru y- ] I am using RVM to install a project.
+ 400695 [lists@ru y- ] You didn't say what platform you are building on.
+ 400734 [lists@ru y- ] When installing the openssl with rvm isn't the openssl compiled and
| + 400737 [aleiphoenix@] `rvm install` shows message about the openssl
| + 400761 [fluido@fl id] Did you also perhaps install a copy of openssl from source?
+ 400739 [lists@ru y- ] No.

How to restore input from within a loop or similar?
400674 [lists@ru y- ] I currently have a pseudo irc client.
+ 400675 [lists@ru y- ] so you want to pass control back to the loop from within the select()
+ 400694 [lists@ru y- ] exit stops the whole program

[ANN] sportdb gem - Free Open Sports Database (Football Fixtures & More) Command Line Tool
400677 [gerald.bauer] I've extracted from Sportbook [1] the football fixtures (including

Passing folder as argument ARGV?
400680 [lists@ru y- ] Is there an easy way to pass multiple files on the command line?
+ 400681 [bradleydsmit] How are you traversing the directory you pass in on the command line ?
| + 400682 [peterhickman] What os are you using? Here is one way to get things to work on OSX or
| + 400683 [lists@ru y- ] my_files = ARGV
|   400684 [bradleydsmit] Have you tried to add a debug statement inside your loop so you can
|   400688 [lists@ru y- ] Thanks guys.
|   + 400689 [bradleydsmit] yes.
|   | 400691 [lists@ru y- ] in 'initialize': Permission denied - ./my_files (Errno:EACCES)
|   | 400692 [bradleydsmit] You do not have permissions on the directory or file.
|   | 400693 [lists@ru y- ] I run the terminal as Admin and they are just .txt files? how do I check
|   | 400700 [bradleydsmit] If on a nix is, type this.
|   + 400690 [lists@ru y- ] p Dir["#{File.expand_path(ARGV[0])}/*"].each.map { |f|
|   + 400717 [lists@ru y- ] No.  The only thing that the ARGV array will contain is the folder name
+ 400685 [lists@ru y- ] First ARGV is an array of all arguments to Ruby program. So regardless
+ 400687 [lists@ru y- ] oops, don't miss the '}' at the end

File.readable? and /proc
400697 [lists@ru y- ] root@nail:/projects/proc_fs# uname -a
+ 400701 [lists@ru y- ] You are loggeg in as 'root'! Ruby is obviously aware of your superuser
| 400703 [lists@ru y- ] root@nail:/projects/proc_fs# ls -al /proc/sys/fs/binfmt_misc/register
| + 400705 [lists@ru y- ] (1) You should not be using superuser account for regular work!
| | 400706 [lists@ru y- ] And if you 'regular work' involves interrogating the /proc file system,
| | + 400708 [lists@ru y- ] Then you better are not surprised when such things happen, or go first
| | | 400709 [lists@ru y- ] 1) None of this was run 'in /proc filesystem'. Note the prompts.
| | + 400712 [sduncan@we a] You could use something like this? You'd need to flesh out some error/
| |   400724 [lists@ru y- ] Sam, Thanks for this.
| + 400713 [ryand-ruby@z] Yeah. But that's just how root works and is both a blessing and a curse.=20=
+ 400702 [bradleydsmit] Normally proc files are either read-only or read-write.  I had to look
| 400704 [lists@ru y- ] As I mentioned to Igor, the inconsistency between File.readable? and the
+ 400711 [lists@ru y- ] is the same, as being in /proc as root.

Marshal.load weird issue
400714 [lists@ru y- ] I can't get my head around this. Obj is a fairly big object, quite a bit
+ 400715 [lists@ru y- ] Will be nice if you show the exactly error.
+ 400722 [lists@ru y- ] Thanks a lot
+ 400723 [lists@ru y- ] Just to be clear (the error message is a bit confusing): I get the error
| 400738 [shortcutter@] What is Obj?  Why do you store this object in a constant?  Can you
+ 400741 [lists@ru y- ] I am so sorry I made this confusing: Obj is not a constant. Not sure why
| 400742 [fluido@fl id] If you compile your own ruby (not a difficult task, but then again,
| 400743 [matma.rex@gm] Can you check if the value returned by Marshal.dump(Obj) on subsequent
+ 400751 [lists@ru y- ] You are right, they are not equal.
| 400754 [shortcutter@] I think we need to know more about what ps actually is.  This looks
+ 400757 [lists@ru y- ] Thanks guys.
  400762 [shortcutter@] If AR means ActiveRecord then you may run into the situation that

Newbie : Regular expression
400716 [lists@ru y- ] Can some one please tell me of an example expression which maps to this
+ 400718 [lists@ru y- ] r = 'hello'
| 400719 [lists@ru y- ] Thanks for the prompt reply. Can you explain a bit about #{r}. What that
+ 400720 [   ar@le .m ] That depends entirely on what the value of "r" is. The #{} is interpolation, like in strings.
+ 400721 [lists@ru y- ] greeting = 'hello'
+ 400727 [ryand-ruby@z] it is entirely dependent on what `r` evaluates to... so no, we can't really.

Is ruby C source code more complex than python C source code?
400725 [lists@ru y- ] Is ruby C source code more complex than python C source code?
+ 400726 [echristopher] That sounds like a really subjective question.
| 400745 [bradleydsmit] indeed.
| 400746 [jarrodhenry@] Complex how?  What would that prove anyway?  And what version of Ruby?
+ 400753 [lists@ru y- ] Ruby 1.9.3 (writen in C)
+ 400823 [stu@ru yp og] You will need to define what you mean by complex. Are you referring to ADTs?

csv.rb:1342:in `initialize': No such file or directory
400729 [lists@ru y- ] ruby-1.9.3-p286
+ 400730 [graham@me he] The tilde (~) expansion to the home directory name is a feature provided
| 400732 [sagy.drucker] The exact same code works for me with a different path.
| 400733 [lists@ru y- ] Thanks everyone.  That was simple.
+ 400731 [saji@u- iz .] I think you should replace ~ with  ENV['HOME'] !
+ 400735 [sto.mar@we .] filename = File.expand_path(dir + file)
  400736 [lists@ru y- ] Oh, thanks!

Running a Ruby script through a shortcut on a different drive.
400748 [lists@ru y- ] I have a script which dumps a logfile into its local directory. This has
400749 [jeremy@bo p.] In the properties for your shortcut, set the "Start in" path to wherever
400750 [lists@ru y- ] Thanks Jeremy! I'd forgotten about that option.
400752 [jeremy@bo p.] Unless there is a good reason to do otherwise, you may want to

RubyConf Ticket
400756 [winstont@um ] If anyone is looking for a RubyConf Ticket, I have one available at cost

Can you rewrite this ruby form post with rack?
400758 [lists@ru y- ] require 'rack'
400805 [lists@ru y- ] Open the .html form, read it, interpolate it, assign the result to body.

Erb syntax - unknown syntax
400759 [lists@ru y- ] tell me
400763 [sto.mar@we .] or use `ri ERB' in the command line.
400764 [lists@ru y- ] okay what about the '!' in  <%! if filmstrip_image_path.blank? %>
400765 [sto.mar@we .] Sorry, no clue. It doesn't seem to be a part of erb.
400769 [lists@ru y- ] I don't think it is associated with the if condition, here there is
400780 [sto.mar@we .] And this code works? Are you really using the standard erb?
400837 [lists@ru y- ] Thanks you, I really appreciate your help on this.

sending browser.screenshot over DRb (watir-webdriver)
400760 [lists@ru y- ] I am following:http://watirwebdriver.com/screenshots/  and I am

Cant seem to find whats worng
400766 [lists@ru y- ] Could anybody help me to figure out what is wrong with this script. I am
400767 [lists@ru y- ] A more meaningful thread title would have been nice...
400768 [lists@ru y- ] Sorry about the title. No the playlist file does not contain any data,
400770 [lists@ru y- ] I see. In this case the songs array must be empty. Try to remove the
400771 [lists@ru y- ] Ok thanks, I'll do that and let you know how it goes.
400772 [lists@ru y- ] Yeah, works well now, thanks heaps for that.
400773 [lists@ru y- ] No problem.

gem install bundler
400774 [lists@ru y- ] I try to install bunder in a specific version
400777 [lists@ru y- ] Didn't get it woring with the gem install ....

undefined method each_pair
400779 [lists@ru y- ] I get a strage Error on a Project which runs without Problems on the
400841 [lists@ru y- ] Found a solution, but this really didn't satisfied me.

bug?: local variable created in if modifier not available in modified expression
400781 [lists@ru y- ] irb(main):001:0> local1 if local1 = "created"
+ 400782 [matma.rex@gm] This is a known quirk of parsing; variables are considered "declared"
| 400786 [lists@ru y- ] _____________________________________
| + 400795 [shortcutter@] It could, but it doesn't - because of the current semantics. :-)
| + 400804 [lists@ru y- ] 1. It would be enormously inefficient if every time you invoked an
+ 400807 [matma.rex@gm] Oh, and in case it wasn't apparent: you can just add
| 400808 [eliezer@ng e] I am wondering who will use such if condition?
| 400809 [shortcutter@] That's a good question.  Generally assignments in conditions of control
| 400810 [fluido@fl id] Having spent my good share of debugging time, I want to add that it
| 400815 [shortcutter@] You mean like
| 400816 [fluido@fl id] #!/usr/bin/env ruby
| 400820 [matthew@ke w] Dude, did you seriously just write and compile a C program from within
| + 400825 [fluido@fl id] May be useful sometimes...
| + 400896 [lists@ru y- ] Have a look at the RubyInline gem.
+ 400811 [lists@ru y- ] Since "while" was brought up, it's worth mentioning that this also
+ 400893 [lists@ru y- ] Ignoring the confusing and to interpreter ambiguous syntax above, which
  400897 [lists@ru y- ] Please don't take any notice of this. There are no "static variables" or
  400899 [lists@ru y- ] You are misleading us here with {{ def bar; "Method bar"; end }} before
  + 400901 [matma.rex@gm] Everybody, please ignore Igor, he's a troll and he doesn't know what
  + 400903 [lists@ru y- ] On the contrary, it is you who are misleading people with your
    400906 [lists@ru y- ] I enjoyed reading your last reply, and have to admit that in your
threads.html
top