395842-396967

395607-395956 subjects 396086-397471

How to replace a letter with a corresponding number
395842 [lists@ru y- ] I am working through the Ruby Quiz website and I am already stuck on
+ 395844 [quangduongha] 1. Create a hash contains character as key and its corresponding number as
| 395845 [quangduongha] result = s.split('').collect { |x| alpha_table[x] }
+ 395846 [jgabrielygal] First of all you need to know if you have a formula to calculate the
+ 395852 [botpena@gm i] try
+ 395893 [lists@ru y- ] Awesome!  Thanks guys, I appreciate it.

Mail Gem Not Working
395843 [lists@ru y- ] Mail.defaults do

Could'nt install cucumber-rails gem
395849 [lists@ru y- ] I am trying to install a gem 'cucumber-rails' version 1.2.1 on a Windows
395869 [lists@ru y- ] Follow the steps to verify the registry information and let us know.

[ANN] OStruct2 v0.2.0 released
395865 [transfire@gm] OStruct2 0.2.0 has been released.

looking for a ruby idiom : r=foo; return r if r
395883 [botpena@gm i] am looking for a ruby idiom on the ff
+ 395886 [matthew@ke w] You can force it into one line in various ways if that's what you
+ 395887 [lists@ru y- ] This is a BUG!
  395891 [shortcutter@] No.  Local variables are defined from the location of their first
  395892 [matthew@ke w] I knew I was missing something. Thank you Robert.
  395894 [botpena@gm i] thank you all, matt/llelan/robert.
  395895 [shortcutter@] You're welcome!
  + 395912 [botpena@gm i] hmm, dunno. i always do that in C. and besides, coders should always
  | 395955 [botpena@gm i] just ff up in case i'm wrong here.
  + 395915 [matthew@ke w] Ditto.
    395957 [shortcutter@] But where is the point in searching for a short, concise idiom and

Simple IO question
395888 [lists@ru y- ] f = File.new("test.txt", "r")
+ 395889 [jgabrielygal] a =3D f.getc assigns to the variable a the next character from the file
+ 395890 [humbroll@gm ] f.getc will return nil when there is no char more.

Don't override it - Use it
395901 [lists@ru y- ] I am learning Ruby.  It is my understanding that when we "override" a
395905 [lists@ru y- ] This technique is *very* common. It's one of the basic features of
395910 [lists@ru y- ] I read the wikipedia link.  As a reader who knows nearly nothing, it
+ 395913 [hmaddocks@me] From the point of view of the caller you have 'replaced' the method with your custom (sub class) version. The fact that you are calling super is an implementation detail that the caller is blissfully unaware of.
+ 395917 [quangduongha] In Ruby, the *overriding* actually is *shadow* the superclass's method
| 395919 [matthew@ke w] he
| 395921 [matthew@ke w] You know what, I just realised I was reading Duong's message in
+ 395925 [lists@ru y- ] It doesn't matter if the overriding method is actually completely new or
  396059 [lists@ru y- ] I've been meaning to respond to this.  Yes, I am aware of that fact.
  396060 [shortcutter@] hat

[C exte] rb_protect() with more than a single parameters
395902 [ibc@al ax ne] VALUE
395935 [ammarabuali@] I did not find another way after searching for a while, including the
395997 [ibc@al ax ne] Really interesting your approach :)

[C exten] Could Ruby GC my VALUE in while acquiring the GVL?
395904 [ibc@al ax ne] variable defined in my .c file and later I acquire the GVL and want to
395911 [normalperson] Static variables in C are global to the process and not on the stack,
395934 [ibc@al ax ne] Clear.

[ANN] minitest 3.0.1 Released
395907 [ryand-ruby@z] minitest version 3.0.1 has been released!

autorun .rb like a .php
395908 [lists@ru y- ] must be) to autorun my scripts .rb.
+ 395909 [marco-oweber] Try googling for "apache howto ruby module" or such.
+ 395918 [lists@ru y- ] I would terminate your ruby file with .cgi instead of .rb.
+ 395932 [lists@ru y- ] Although it can be done, and is OK just for playing, it's not a good way

Modify an attribute in a method?
395914 [lists@ru y- ] class Klass
395916 [quangduongha] # getter
395920 [saji@u- iz .] Hope this helps  .....
395922 [lists@ru y- ] Certainly can be done in many ways, but what I want to do is spend just
+ 395923 [saji@u- iz .] then may be this is better ....
+ 395924 [quangduongha] I'm sorry, just to make the problem more clear.
+ 395926 [lists@ru y- ] No, you cannot do it that way.

Re: rb_protect() with more than a single parameters
395927 [lists@ru y- ] struct yourdatatype

max value in an array of csv file
395928 [ivan_vilches] ...
+ 395943 [paul@aw .c m] You are comparing the values as strings (
+ 395948 [botpena@gm i] as paul have said, data is being treated as text. since you are using

accessing data in a ruby array
395929 [lists@ru y- ] I have this array. I want to access the stuff in the hashes.
395930 [lists@ru y- ] I have this array. I want to access the stuff in the hashes.
395931 [matthew@ke w] The keys in the hash appear to be strings, so use: product[1]["id"]
395933 [shortcutter@] Maksim, can you post a http://sscce.org/ - maybe as gist or pastie?

watch variable in Aptana 3 and Ruby 1.9
395939 [lists@ru y- ] How I can set the watch on variable's in ruby. I am using Aptana as IDE.
395951 [cursorubyonr] Unsuscribe

Gistflow.com - an open-source gist sharing service is released
395942 [lists@ru y- ] Gistflow.com is a website for posting and sharing code-related posts. It

[ANN] makerakeworkwell 1.0.0 Released
395944 [ryand-ruby@z] makerakeworkwell version 1.0.0 has been released!
395947 [hmaddocks@me] Link or it didn't happen.
395950 [ryand-ruby@z] gem install says otherwise. As usual, all my stuff is synced to the =

Problems with Rbehave
395945 [lists@ru y- ] as a beginner with Ruby would like to try out the rbehave code at

[ANN] zenweb 3.0.0.b1 Released
395946 [ryand-ruby@z] zenweb version 3.0.0.b1 has been released!

[ANN] loggability 0.3.0 Released
395958 [ged@Fa ri MU] loggability version 0.3.0 has been released!

my first gem
395959 [lists@ru y- ] I am a newbie ruby hobbyist and have just signed of my first gem.
396058 [code@ap th o] Maybe it's just me, but for something like this I'd prefer a
396119 [lists@ru y- ] Thank you for your help, I will look into %Q

SimpleCov error on Ruby 1.9.3 (but OK on 1.9.2)
395960 [proulx.antoi] I have a problem with SimpleCov, but I don't think the problem is the
395985 [whitequark@w] Hm, you don't have any external libraries. Awesome! Can you post
396009 [proulx.antoi] GitHub (linked on the Travis CI page).
396036 [whitequark@w] Fascinating, I have reproduced that on my system. I'll look into this

looking for a ruby equivalent of python's ply
395961 [botpena@gm i] (lex-yacc). cant google it, so hoping it's just hidden somewhere...
395984 [whitequark@w] Try treetop: http://treetop.rubyforge.org/
395992 [botpena@gm i] thanks for the info, peter.  looking at treetop now.

[ANN] Lone Star Ruby Conference 6 - Call for Speakers
395962 [jimfreeze@gm] Lone Star Ruby Conference 6

parse result page
395963 [lists@ru y- ] how to fetch a page then enter some text parse the results page and
+ 395964 [quangduongha] You can use mechanize [1] to fetch the page and nokogiri [2] to parse
+ 395965 [lists@ru y- ] could you ive me a piece ofcode

Am I justified to use a global variable if it must be used in all scopes?
395966 [lists@ru y- ] Ever since I started learning Ruby, I've been strongly discouraged
+ 395967 [jonanscheffl] Perhaps a singleton class? It seems to me that you're probably in need of
+ 395969 [lists@ru y- ] A Singleton class of what kind of object?
| 395970 [jonanscheffl] Name the class whatever you like. I think 'Jonan' would be an excellent
+ 395972 [lists@ru y- ] Your description suggests that you don't plan to reassign the Heap
+ 395973 [gennady-ruby] of
+ 395974 [lists@ru y- ] I just wanted to give you an idea of what the program is supposed to do.
| 395999 [gennady-ruby] excellent
+ 395975 [hmaddocks@me] Breaking the 'rules' is fine as long as you understand why the rule exists in the first place.
+ 395987 [shortcutter@] There are circumstances where it is reasonable, see the other replies.
  395996 [whitequark@w] I find it quite likely that you are using singletons a lot. I'd say
  395998 [shortcutter@] I don't - meaning: I don't use singletons a lot.  The same statement I

how to use the following actions.
395968 [lists@ru y- ] I created a Mechanize action that fetches all the raw html pages and
396004 [shortcutter@] Required results being what?

Garbage Collector(GC) and nil
395971 [lists@ru y- ] will not use anymore for the sake of save memory system, I didn't see
+ 395982 [whitequark@w] Ruby MRI (other implementations work in a somewhat similar way) uses
+ 395986 [shortcutter@] Depends on whether we are talking instance variables or local
+ 395990 [lists@ru y- ] I have fully understand how it work, because of u Robert and Peter,

flat_out : new gem to create fixed width records
395976 [lists@ru y- ] I have a requirement to create an 800+ character record layout to export
+ 395978 [neotamizhan@] Just adding the github page here for reference.
+ 395980 [transfire@gm] ...

have any src for arm platform?
395977 [lists@ru y- ] If I need  make  on arm platform ?
395983 [whitequark@w] Ruby can be cross-compiled to ARM; I did it. You will need a cross

[C exten] extconf.rg and #ifdef
395979 [ibc@al ax ne] Windows, I need some #defines (i.e: OS_UNIX or OS_WIN).
+ 395981 [whitequark@w] Yeah, that's pretty much how configure scripts work. (More complex ones
| 395994 [ibc@al ax ne] Thanks, I understand. However that worries me is the fact that the
+ 395993 [quintus@qu n] What is wrong with the generic macros the compiler sets itself? If I
| 395995 [ibc@al ax ne] That would be, of course, much better than "auto-detecting" in
+ 396075 [drbrain@se m] Do not use host_* values from rbconfig.rb.
  396097 [ibc@al ax ne] Good to know. Thanks a lot.

Where is tcpserver.c Included By socket.c?
395991 [jam@ja an be] Hey folks,
396005 [lists@ru y- ] Which Ruby are you looking at? In 1.8 it's pretty simple, the constant
396007 [jam@ja an be] that
396008 [jam@ja an be] that

faster CSV writing
396000 [lists@ru y- ] trying to take scraped info business name address and phone# i can get
+ 396003 [shortcutter@] uto+repair"))
| 396006 [lists@ru y- ] trying to send all the data scraped to csv file
| 396018 [lists@ru y- ] FasterCSV.open("test.csv", "w") do |csv|
| 396041 [lists@ru y- ] Brian i checked and i'm pulling data and i gave some though about you
| 396049 [lists@ru y- ] What *exactly* do you see from these two lines? (Copy-paste it please.
+ 396034 [lists@ru y- ] Thanks for the response im getting data with puts ill dig deeper today.
+ 396055 [lists@ru y- ] steven@steven:~/Desktop$ ruby test.rb
  396967 [lists@ru y- ] still havn't got any help with this and tried several things anyone,

[ANN] Rails 3.0.13.rc1, 3.1.5.rc1, 3.2.4.rc1 have been released!
396001 [tenderlove@r] Good news everyone!

Re: extconf.rg and #ifdef
396002 [lists@ru y- ] #if defined(__unix__) || defined(__POSIX__) || defined(__APPLE__)
396047 [ibc@al ax ne] Excellent, I didn't realize of that :)
396101 [lists@ru y- ] While this definition of host/target appears wrong, it doesn't matter in
396102 [lists@ru y- ] Forgot to include the following doco link to compare with the link Eric

does this leak more than the size of the string via timing side channels
396010 [lists@ru y- ] string1 = "string"
+ 396011 [lists@ru y- ] def message_authentic?(ciphertext, key, presented_mac)
| 396012 [idkravitz@gm] In your example you simply testing two strings for equality, with exception
| 396013 [idkravitz@gm] Whoops, my mistake -- your code behaves exactly like testing string for
+ 396014 [lists@ru y- ] Yes but I imagine that Ruby returns false on the first mismatch. So
| + 396015 [martin.bossl] Compute a secure hash of both arguments and compare that instead. Timing
| | 396019 [matthew@ke w] char-by-char comparison
| | 396020 [matthew@ke w] Er, sorry, I misused the variable names. Obviously I meant
| + 396016 [idkravitz@gm] Ok, now I get it,
|   396021 [martin.bossl] l?
|   396024 [idkravitz@gm] How did i missed it?
+ 396022 [lists@ru y- ] Thanks for the advice I will probably go with your technique Martin. I
| 396023 [martin.bossl] I'm not sure I fully understand, where exactly in your code would that be?
+ 396025 [lists@ru y- ] comparisons.inject(:==)
+ 396026 [lists@ru y- ] But if I use the inject to compare array values in addition to using the
  396027 [martin.bossl] It shouldn't hurt if you do an additional byte-by-byte comparison of the hashes

Problem with connecting to the sftp
396017 [lists@ru y- ] begin

[ANN] parslet 1.4.0
396028 [eule@sp ce c] parslet is a Parsing Expression Grammar based[1] parser library. Uff.

how to create 'numbered symbols' in iterator?
396029 [lists@ru y- ] I had this
+ 396030 [lists@ru y- ] you can
+ 396031 [matthew@ke w] Since a symbol is just an interned string you can use "key#{i}".intern
+ 396032 [lists@ru y- ] both of those ways give me errors that are NOT present when I use this
+ 396033 [lists@ru y- ] never mind it is because I didn't return the hash anymore

[ANN] Rabbit 1.0.7
396035 [kou@co mi ng] Rabbit 1.0.7 has been released!

[ANN] obscenity 1.0.0 Released
396037 [tjackiw@gm i] obscenity version 1.0.0 has been released!

[C exten] Is it possible to avoid longjmp in exceptions, Thread#kill, exit(), signals?
396038 [ibc@al ax ne] point if an exception, Thread#kill, exit or a non trapped signal
396039 [ibc@al ax ne] Please forget this for now. I've realized that my call to rb_protect()
+ 396040 [quintus@qu n] You seem to work quite heavy with Ruby°«s extension mechanism and
| 396042 [ibc@al ax ne] Sure, I'll do it. Just let me some time until I get all this stuf
+ 396043 [whitequark@w] Let me still answer your question.
  + 396044 [jos@ca no k.] What about using http://en.wikipedia.org/wiki/Setcontext ? Seems slightly
  | 396052 [whitequark@w] It's pretty much the same thing, just a bit more generic.
  + 396048 [ibc@al ax ne] My C exten runs a libuv (https://github.com/joyent/libuv/) C loop

Thor and HTTParty
396045 [lists@ru y- ] I am trying to use HTTParty in my thor but it is not working. All I wish

Server maintenance
396046 [shugo@ru y- ] Services of ruby-lang.org including www, mailing lists, and Subversion

Unsubscribe
396050 [jared_rachel] Unsubscribe

Problem with duplicated values in writing to an array
396051 [schang@wx .n] arr       = []
396053 [lists@ru y- ] Variables are references in Ruby. When you assign the "code" array to
396054 [schang@wx .n] Many thanks for your answer.
396056 [lists@ru y- ] This is certainly a good idea. Whenever you have multiple arrays with

Unsubscribe
396057 [vadulasp@ya ] T-Mobile. America's First Nationwide 4G Network

Newbie question: command line to execute a method from .rb file
396061 [lists@ru y- ] So, I'm sorry for this very basic question which makes me feel like a
+ 396065 [jgabrielygal] are not calling them
+ 396066 [shortcutter@] Not sure what those functions are used or intended for - I cannot see
+ 396068 [lists@ru y- ] Ahhhh!
  396069 [shortcutter@] Well, you can also use the whole script as "function".  Arguments are

CGI::Session - New session created everytime session is hit.
396062 [lists@ru y- ] It is my understanding that when a new session instance is created by
396064 [sophrinix@gm] Take a look at the legacy version of tryruby. I used CGI directly and did

unsubscribe-confirm 2012053101312731403265067620 mahendra iie.org.mx
396063 [mahendra@ii ] ...

displaying the same output
396067 [lists@ru y- ] how to display the exact results by selecting the values in form

Re: displaying the same output for whichever values i select in the form.
396070 [lists@ru y- ] Sorry but you've hit the wrong forum. This one is for Ruby (the

[C exten] The last question about rb_gc_register_address(): a case in which in works with dynamic memory
396071 [ibc@al ax ne] about rb_gc_register_address() is that it's only valid for fixed
396072 [ibc@al ax ne] "The rb_gc_register_address function is calling ALLOC every time and

Re: The last question about rb_gc_register_address(): a case in which in works with dynamic memory
396073 [lists@ru y- ] A long time ago (probably ten years ago) I got a reply from Matz that if
396074 [ibc@al ax ne] // Create an Array.

[ANN] Rails version 3.0.13 has been released!
396076 [tenderlove@r] Good news everyone!  Rails version 3.0.13 has been released.

[ANN] Rails version 3.1.5 has been released!
396077 [tenderlove@r] Good news everyone!  Rails version 3.1.5 has been released.

[ANN] Rails version 3.2.4 has been released!
396078 [tenderlove@r] Good news everyone!  Rails version 3.2.4 has been released.

Send commands to Telnet.exe
396079 [lists@ru y- ] Dear,
396080 [lists@ru y- ] Possibly via Popen?
396209 [lists@ru y- ] Thanks Marc!!!
396214 [ryand-ruby@z] Marc gave you exactly what you need to move forward.=20

need help with this
396081 [lists@ru y- ] the method exp(x,y) is passed two integers and returns x^Y write a
+ 396082 [ryand-ruby@z] Instead of answering you, I'm going to ask you how you'd answer it =
+ 396083 [lists@ru y- ] No, this code will not run.
+ 396090 [shortcutter@] No, you are missing an "end". ;-)

TV Notify - A TV notification program.
396084 [lists@ru y- ] Since school is out I figured I would write a little project. And the

Registry editing in Windows 7
396085 [lists@ru y- ] I'm trying to edit 1 key in the Windows 7 registry and I'm having
+ 396087 [jam@ja an be] Hey Jason,
+ 396095 [lists@ru y- ] Ok, this is weird. If I use
  396096 [jam@ja an be] Hey,
threads.html
top