Re: is it bug? for
- From: "Axel Etzold" <AEtzold@xxxxxx>
- Date: Sat, 30 Jun 2007 22:17:24 +0900
Dear Chung Chung,
no it's not a bug. The error message you get means that
there is no method "to_s" defined that will turn a String
into an Array.
You can change that by writing it:
class String
def to_a
return [self]
end
end
a="a string"
p a.to_a =>["a string"]
or simply by putting brackets around whatever
String you have.
Best regards,
Axel
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN:
http://www.gmx.net/de/go/smartsurfer
.
Relevant Pages
- Help in French|Spanish|German translation.
... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ... (microsoft.public.fox.helpwanted) - Re: passing a string to a dll
... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ... (microsoft.public.vc.mfc) - Re: passing a string to a dll
... I might handle the array. ... I actually have been wondering if I could use a second string ... look at insertion cost, organization cost, and search cost. ... (microsoft.public.vc.mfc) - RE: Structure conversion from C++ to VB-2008?
... One of the most important structures is AmiVar structure. ... point number, the array of floating point numbers, a string or IDispatch ... Dim 13012679 as Integer ... (microsoft.public.dotnet.languages.vb) - Structure conversion from C++ to VB-2008?
... One of the most important structures is AmiVar structure. ... point number, the array of floating point numbers, a string or IDispatch ... Dim 13012679 as Integer ... (microsoft.public.dotnet.languages.vb) |
|