On 30 Nov 2006, at 18:36, Jose francisco Gonzalez carmona wrote:

>   data = 'abcdefghijklmnsopqrstuvwxyz\n'
>
[snip]
>
> but changing the data variable from sigle quoted to double quoted:
>
>   data = "abcdefghijklmnsopqrstuvwxyz\n"
>
> the answer is:
>
>   verified: false
>
> i know that escaped characters are treated diferently within double
> quoted strings, but i sign and verify the same data in both cases.
> hat's happen?

It's not quite the same data in both cases.  The \n is treated  
differently as you mentioned and this difference makes the whole  
string different.

In IRB:

 >> puts 'abc\n'
abc\n
=> nil

 >> puts "abc\n"
abc
=> nil

 >> 'abc\n'.length
=> 5

 >> "abc\n".length
=> 4

Regards,
Andy Stewart