[#399883] Windows XP - Path encoding problem prevents script execution — "S. Hieko" <lists@...>
Hello all,
S. Hieko wrote in post #1078130:
Jon Forums wrote in post #1078172:
> However the script's path displays incorrectly inside the command prompt
[#399888] DRB not connecting from two diffrent computers — ajay paswan <lists@...>
Hi I am following:
[#399894] cannot reverse string using drb :( — ajay paswan <lists@...>
Just playing with DRB
On Mon, Oct 1, 2012 at 6:34 PM, ajay paswan <lists@ruby-forum.com> wrote:
What is exactly map? is it enumerator? then what was the problem with my
[#399897] \r\n for EOL in windows? — Roger Pack <lists@...>
I believe "\r\n" is a normal newline for windows "type" files.
[#399922] sparse xml string — ajay paswan <lists@...>
How to sparse a string like:
[#399927] delete object from array of object — ajay paswan <lists@...>
Suppose a class:
[#399938] how to read arrary with an array — "Richard D." <lists@...>
Hello. I believe this is basic question, but I'm just starting to learn
after some experimenting, I understand but still have a bit of fog.
[#399948] Void value expression error? — abhay 401 <lists@...>
Hi,
[#399952] Ruby Mechanize and do-if loops — Sybren Kooistra <lists@...>
Hi all,
[#399992] How can I catch browser error in watir-webdriver? — ajay paswan <lists@...>
Like I want to catch two errors saparately:
[#399997] Writing developer's document and user's document — ajay paswan <lists@...>
I have developed a software using DRb, now as I have completed I want to
Developer docs are probably best written as rdoc inside the code. Check the standard library docs for array for a solid example.
Am 03.10.2012 20:10, schrieb ajay paswan:
[#399998] Cucumber Automation: Issue with ansicon.exe and ruby — "Rahul D." <lists@...>
When installing ansicon v.1.3.2 and running a cucumber feature file, I
[#400005] How to get installed module version — "Abhishek K." <lists@...>
Hi,
On Thu, Oct 4, 2012 at 11:49 AM, Abhishek K. <lists@ruby-forum.com> wrote:
"Jes炭s Gabriel y Gal叩n" <jgabrielygalan@gmail.com> wrote in post
[#400013] Unable to work with class variable — ajay paswan <lists@...>
Here is my code:
[#400021] Calculation of heights — Joao Silva <lists@...>
Hi All
On Thu, Oct 4, 2012 at 7:26 PM, Joao Silva <lists@ruby-forum.com> wrote:
[#400046] Ruby range - verify if date lies between two specified dates — ideal one <lists@...>
Hi All,
On Fri, Oct 5, 2012 at 4:01 PM, ideal one <lists@ruby-forum.com> wrote:
[#400050] img src while sending email ruby cgi — Ferdous ara <lists@...>
Hi
ok to make this same as that link
What do you mean "no luck"? Is the message sent and received, but
[#400055] Regular Expression Help — Brad Askins <lists@...>
Hi, new to the forum, not new to Ruby but very new to Regular Expression
[#400080] How to add mime module to sent email ruby — Ferdous ara <lists@...>
Hi
[#400099] know my IP in LAN — ajay paswan <lists@...>
Hi how can I know my IP through which two computers communicate in LAN?
[#400104] Changing the default extension of Ruby — Ghassen SMIDA <lists@...>
Hi,
Where? In what environment? What for?
I'm developing Ruby under Windows. My web host is running under linux
On Sun, Oct 7, 2012 at 12:02 PM, Ghassen SMIDA <lists@ruby-forum.com> wrote:
Hassan is quite correct
[#400111] General Syntax question, Definiting Methods — "Richard D." <lists@...>
I think my question is more about general syntax, than more about
[#400116] What is the error: unexpected break? — ajay paswan <lists@...>
What are the possible reasons for this?
Hi,
Jan E. wrote in post #1078940:
[#400131] Multithread in DRb — ajay paswan <lists@...>
Suppose I want to create 6 threads in client side
[#400138] Some warnings Watir webdriver/selenium/fork — ajay paswan <lists@...>
/usr/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.1/lib/watir-webdriver/elements/generated.rb:1173:
If you want to temporarily suppress warnings you can try this:
Joel Pearson wrote in post #1079295:
[#400139] Undefined method `-' for nil — Joz Private <lists@...>
Hi guys.
On 10/09/2012 09:13 AM, Joz Private wrote:
class Developer
[#400143] Is watir web driver thread safe? — ajay paswan <lists@...>
My subject is the question.
[#400149] Why doesn't ruby support native threading? — ajay paswan <lists@...>
I think supporting native threading is a great thing in terms of
[#400167] SocketError when letting ruby open url from txt-file — Sybren Kooistra <lists@...>
Hi all,
[#400171] Simulation of a dictionary — Joao Silva <lists@...>
Hi all.
[#400176] Convert String to Currency — ideal one <lists@...>
Hi All,
[#400196] How get list of all installed modules/gems in ruby — "Abhishek K." <lists@...>
Hi,
Thanks.
[#400201] Seconds to hr:min:sec — ajay paswan <lists@...>
How can I convert seconds to the format in subject.
[#400207] How to create an Array in a Hash — Muhammad Salman <lists@...>
Hi,
[#400212] && should work in a system call? — Roger Pack <rogerdpack2@...>
Hello.
> system("ls && ls")
2012/10/10 Roger Pack <rogerdpack2@gmail.com>:
[#400226] google_hash v 0.7.0 released. Faster hashes for MRI. — Roger Pack <rogerdpack2@...>
Hello.
[#400233] ghost methods and dynamic methods — dis guy <lists@...>
I am a newbie to ruby please explain your answers thoroughly. I am
[#400302] multiple array problem — Roelof Wobben <rwobben@...>
[#400317] is an unsafe binding context that does not close over anything, actually safe — "Mean L." <lists@...>
def context_binding
On Sun, Oct 14, 2012 at 11:28 AM, Mean L. <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1079785:
def context_binding
2012/10/19 Mean L. <lists@ruby-forum.com>:
[#400322] best way to extract data from a string? — Erez Ben shoham <lists@...>
Hi
[#400328] how to join the return of array — Ruby Mania <lists@...>
I know joining arrays and strings but this issue is very specific to an
[#400338] About define_method — li shoubo <lists@...>
I want to define a method in kernel using Flattern Scope.
On Mon, Oct 15, 2012 at 8:37 AM, li shoubo <lists@ruby-forum.com> wrote:
[#400351] Drop 1st and last particular character — ajay paswan <lists@...>
What is the most efficient way to drop '#' from the first place and last
You didn't mention what if you have three times '#'.
or both regexp combined:
On Tue, Oct 16, 2012 at 9:38 AM, Hans Mackowiak <lists@ruby-forum.com> wrote:
[#400367] Converting binary string to integer for a Ruby newbie — John Ringwalt <lists@...>
I want to convert a string of binary code ("011001") to the integer
[#400374] database part of a desktop application — "Sebastjan H." <lists@...>
Hi,
On Wed, Oct 17, 2012 at 05:28:39AM +0900, Sebastjan H. wrote:
Am 16.10.2012 23:24, schrieb Chad Perrin:
On Wed, Oct 17, 2012 at 01:39:21PM +0900, sto.mar@web.de wrote:
Chad Perrin wrote in post #1080198:
> Thank you all for suggestions, I've tried PStore and YAML::Store and
> There is one thing that's odd though. If I want to manually edit or view
Arlen Cuss wrote in post #1080420:
I need some further advise. I would go with either YAML or YAML::Store
[#400379] Problem trying to build Ruby 1.9.3-p286 on PC-BSD — Daniel Berger <djberg96@...>
Hi,
[#400386] Unable to send attachment, and dealing with multiple attachment — ajay paswan <lists@...>
Hi,
On Thursday, 18 October 2012 at 12:21 AM, ajay paswan wrote:
> You appear to be missing a marker somewhere. Why not use the mail gem[1]
> is it compatible with ruby 1.7.8?
1.8.7
how to send multiple attachment using net/smtp?
[#400390] autolog: shortcut for set_trace_func to debug ruby via console output, etc. — Gary Weaver <lists@...>
If it helps anyone, I wrote a shortcut for set_trace_func, so next time
[#400411] Network protocols — "Terje H." <lists@...>
Hi folks
[#400416] Truncate number which ends with 0 decimal — Joao Silva <lists@...>
Hi All.
On 2012-10-18 22:34, Joao Silva wrote:
Wybo Dekker wrote in post #1080338:
[#400438] Documentation for Psych in Ruby 1.9.3? — sto.mar@...
I'm searching and searching... but I can not find the
[#400454] Hash with Integer key issue — Wayne Simmerson <lists@...>
Hi Im new to Ruby and am getting some unexpected results from a
Thanks for all the replies, I actually figured it out about 2 minutes
Am 20.10.2012 14:46, schrieb Wayne Simmerson:
[#400477] Socket help, getting Errno::ECONNREFUSED — max herrera <lists@...>
Hi,
Well, the first thing I would try is using a much higher port number,
[#400504] Exception handelling in ruby — ajay paswan <lists@...>
What is diffrence between:
[#400507] Looking for suggestions processing and comparing 2 very large files — Ruby Student <ruby.student@...>
Team,
If they are sorted you can split into pieces, eg create an
[#400514] Calling class method in instance method of another class — Joz Private <lists@...>
What is the best way of calling a class method in an instance method of
[#400529] CORBA in Ruby — Will Bracken <lists@...>
I'm converting a Java/J2EE app over to Ruby/Rails. I need a solution for
[#400535] Name/symbol/object type clash? What is happening here? — Todd Benson <caduceass@...>
It's nonsense code, but I'm curious as to what is going on behind the scenes...
No doubt, the following code exhibits unacceptable inconsistencies:
On Tue, Oct 23, 2012 at 12:44 PM, Igor Pirnovar <lists@ruby-forum.com> wrote:
Todd B. wrote in post #1080981:
Ryan Davis wrote in post #1081229:
2012/10/25 Igor Pirnovar <lists@ruby-forum.com>:
Robert Klemme wrote in post #1081589:
Robert, please stop feeding the troll. I've received enough e-mails
Oh god, are you still fighting over this crap? If this is the biggest
[#400556] Calling a method foo() or an object foo.method_call_here - both — Marc Heiler <lists@...>
Hello.
Hi,
On Wed, Oct 24, 2012 at 3:20 PM, Marc Heiler <lists@ruby-forum.com> wrote:
[#400565] Is there a better way to invoke methods? — Todd Benson <caduceass@...>
I'm writing a simple script and need to shoot off methods based on
[#400567] Issue in reading excel using Parseexcel — Rochit Sen <lists@...>
Hi All,
[#400582] Googlebot- How to generate a 404 error status after a if statement — "Pierre d." <lists@...>
Hello, I have a multilingual site. Googlebot generates error 500 in many
On Wed, Oct 24, 2012 at 3:07 PM, Pierre d. <lists@ruby-forum.com> wrote:
[#400599] Question for JRuby team — Damjan Rems <lists@...>
Sometimes back I've read that JRUby team is also maintaining RubyOnRails
[#400605] Net::FTP and UTF-8 encoding — "pablasso@..." <pablasso@...>
Hey there,
[#400615] bit count or bit set — Charles Hixson <charleshixsn@...>
In Ruby1.9 is there any good way to count the number of on bits in an
[#400650] OpenSSL ECDSA public key from private — Nokan Emiro <uzleepito@...>
Hi,
Subject: OpenSSL ECDSA public key from private
Thanks Carlo, but it's not what I was looking for. I know about
Subject: Re: OpenSSL ECDSA public key from private
Much better, but it's still not finished... ;-)
[#400652] #encode and (pre/de)composed characters — Hal Fulton <rubyhacker@...>
Why does encode to UTF-8 (in at least this one case) appear to favor a
[#400670] RVM and ruby SSLv2 support — Andraz Brodnik <lists@...>
Hi,
[#400680] Passing folder as argument ARGV? — Joz Private <lists@...>
Is there an easy way to pass multiple files on the command line?
How are you traversing the directory you pass in on the command line ?
Brad Smith wrote in post #1081684:
Have you tried to add a debug statement inside your loop so you can
Thanks guys.
> Is each file in the directory given its own element in ARGV,
[#400697] File.readable? and /proc — Jeff Moore <lists@...>
root@nail:/projects/proc_fs# uname -a
Jeff Moore wrote in post #1081705:
Igor Pirnovar wrote in post #1081710:
Jeff Moore wrote in post #1081712:
[#400714] Marshal.load weird issue — "Pierre J." <lists@...>
Hi guys
[#400716] Newbie : Regular expression — Muhammad Salman <lists@...>
Hi,
[#400725] Is ruby C source code more complex than python C source code? — gmspro gmspro <lists@...>
Hello,
On Sun, Oct 28, 2012 at 11:20 PM, gmspro gmspro <lists@ruby-forum.com> wrote:
[#400729] csv.rb:1342:in `initialize': No such file or directory — Soichi Ishida <lists@...>
ruby-1.9.3-p286
On 29/10/2012 19:05, Soichi Ishida wrote:
[#400748] Running a Ruby script through a shortcut on a different drive. — Joel Pearson <lists@...>
I have a script which dumps a logfile into its local directory. This has
In the properties for your shortcut, set the "Start in" path to wherever
[#400759] Erb syntax - unknown syntax — Georgy Daniel <lists@...>
Hi, I am a very beginner on Ruby and related stuff, Could you please
Am 30.10.2012 05:59, schrieb Georgy Daniel:
okay what about the '!' in <%! if filmstrip_image_path.blank? %>
[#400766] Cant seem to find whats worng — Nuggety Nanna <lists@...>
Could anybody help me to figure out what is wrong with this script. I am
Hi,
Sorry about the title. No the playlist file does not contain any data,
[#400781] bug?: local variable created in if modifier not available in modified expression — "Mean L." <lists@...>
irb(main):001:0> local1 if local1 = "created"
Mean L. wrote in post #1082083:
Igor Pirnovar wrote in post #1082716:
Brian Candler wrote in post #1082725:
Oh, and in case it wasn't apparent: you can just add
On 10/31/2012 4:52 PM, Bartosz Dziewoナгki wrote:
On Wed, Oct 31, 2012 at 4:28 PM, Eliezer Croitoru <eliezer@ngtech.co.il>wrote:
Subject: Re: bug?: local variable created in if modifier not available in modified expression
On Wed, Oct 31, 2012 at 5:00 PM, Carlo E. Prelz <fluido@fluido.as> wrote:
Subject: Re: bug?: local variable created in if modifier not available in modified expression
This is a known quirk of parsing; variables are considered "declared"
[#400784] REXML & HTMLentities incorrectly map to UTF-8 — "Mark S." <lists@...>
I have some XML data (UTF 8) that I'm trying to convert into another XML
Hi,
[#400785] newline conversion on reading? — Xavier Noria <fxn@...>
I can't get newline conversions to work while reading:
[#400817] need regex to check for consonants and put number after each consonant — Justin Gamble <lists@...>
Hello,
Re: Documentation for Psych in Ruby 1.9.3?
On Oct 19, 2012, at 07:52 , sto.mar@web.de wrote:
> I'm searching and searching... but I can not find the
> documentation for Psych on <http://www.ruby-doc.org/stdlib-1.9.3/>.
>
> If I am not mistaken it practically replaces YAML and is part
> of the standard library.
`ri Psych` works great. See below. That said, you shouldn't be using Psych directly. Use YAML instead:
% ri19 YAML
= YAML
(from ruby core)
------------------------------------------------------------------------------
The YAML module allows you to use one of the two YAML engines that ship with
ruby. By default Psych is used but the old and unmaintained Syck may be
chosen.
See Psych or Syck for usage and documentation.
To set the YAML engine to syck:
YAML::ENGINE.yamler = 'syck'
To set the YAML engine back to psych:
YAML::ENGINE.yamler = 'psych'
...
% ri19 Psych
= Psych
(from ruby core)
------------------------------------------------------------------------------
This exists just to satify bugs in marshal'd gemspecs that contain a reference
to YAML::PrivateType. We prune these out in Specification._load, but if we
don't have the constant, Marshal blows up.
This exists just to satify bugs in marshal'd gemspecs that contain a reference
to YAML::PrivateType. We prune these out in Specification._load, but if we
don't have the constant, Marshal blows up.
= Overview
Psych is a YAML parser and emitter. Psych leverages
libyaml[http://libyaml.org] for it's YAML parsing and emitting capabilities.
In addition to wrapping libyaml, Psych also knows how to serialize and
de-serialize most Ruby objects to and from the YAML format.
= I NEED TO PARSE OR EMIT YAML RIGHT NOW!
# Parse some YAML
Psych.load("--- foo") # => "foo"
# Emit some YAML
Psych.dump("foo") # => "--- foo\n...\n"
{ :a => 'b'}.to_yaml # => "---\n:a: b\n"
Got more time on your hands? Keep on reading!
== YAML Parsing
Psych provides a range of interfaces for parsing a YAML document ranging from
low level to high level, depending on your parsing needs. At the lowest
level, is an event based parser. Mid level is access to the raw YAML AST, and
at the highest level is the ability to unmarshal YAML to ruby objects.
=== Low level parsing
The lowest level parser should be used when the YAML input is already known,
and the developer does not want to pay the price of building an AST or
automatic detection and conversion to ruby objects. See Psych::Parser for
more information on using the event based parser.
=== Mid level parsing
Psych provides access to an AST produced from parsing a YAML document. This
tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can be
examined and manipulated freely. Please see Psych::parse_stream,
Psych::Nodes, and Psych::Nodes::Node for more information on dealing with YAML
syntax trees.
=== High level parsing
The high level YAML parser provided by Psych simply takes YAML as input and
returns a Ruby data structure. For information on using the high level parser
see Psych.load
== YAML Emitting
Psych provides a range of interfaces ranging from low to high level for
producing YAML documents. Very similar to the YAML parsing interfaces, Psych
provides at the lowest level, an event based system, mid-level is building a
YAML AST, and the highest level is converting a Ruby object straight to a YAML
document.
=== Low level emitting
The lowest level emitter is an event based system. Events are sent to a
Psych::Emitter object. That object knows how to convert the events to a YAML
document. This interface should be used when document format is known in
advance or speed is a concern. See Psych::Emitter for more information.
=== Mid level emitting
At the mid level is building an AST. This AST is exactly the same as the AST
used when parsing a YAML document. Users can build an AST by hand and the AST
knows how to emit itself as a YAML document. See Psych::Nodes,
Psych::Nodes::Node, and Psych::TreeBuilder for more information on building a
YAML AST.
=== High level emitting
The high level emitter has the easiest interface. Psych simply takes a Ruby
data structure and converts it to a YAML document. See Psych.dump for more
information on dumping a Ruby data structure.
------------------------------------------------------------------------------
= Constants:
DEPRECATED:
[not documented]
ENGINE:
[not documented]
LIBYAML_VERSION:
The version of libyaml Psych is using
VERSION:
The version is Psych you're using
= Class methods:
add_private_type
add_ruby_type
detect_implicit
dump
dump_stream
libyaml_version
load
load_documents
load_file
load_stream
object_maker
parse
parse_file
parse_stream
parser
quick_emit
read_type_class
tagurize
to_json