Forum: Ruby What does this do?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
40920c2420f2ed4841ff4ed2fc34c99f?d=identicon&s=25 Petr Janda (petrjanda)
on 2009-04-16 04:41
Im trying to fix two libraries to be compatible with Ruby 1.9 - gruff
and pdf-writer,

and I came accross this:

SyntaxError:
/usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72:
invalid multibyte char (US-ASCII)
/usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72:
invalid multibyte char (US-ASCII)
/usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72:
syntax error, unexpected $end, expecting ':'
...ength < label.to_s.length ? "â¦" : '')

This is the gruff code:

truncated_label + (truncated_label.length < label.to_s.length ? "â^À¦" :
'')

What does a^A do?

I cant even find these on my keyboard let alone find out what they do.

PDF-writer has something similar

/usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/writer.rb:712:
invalid multibyte char (US-ASCII)
/usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/writer.rb:712:
syntax error, unexpected $end, expecting keyword_end
    content = "%PDF-#{@version}\n%âãÃÃ\n"

Is this hidden Japanese or something?

Thanks,
Petr
40920c2420f2ed4841ff4ed2fc34c99f?d=identicon&s=25 Petr Janda (petrjanda)
on 2009-04-16 05:14
Also Transaction Simple makes this error:

no marshal_dump is defined for class Mutex

/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple.rb:129:in
`dump'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple.rb:129:in
`start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`block in start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`each'
/usr/local/lib/ruby/gems/1.9/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in
`start_transaction'
/usr/local/lib/ruby/gems/1.9/gems/pdf-writer-1.1.8/lib/pdf/simpletable.rb:396:in
`render_on'

ANy ideas?
666b4e17b4bb0e2d999037a25f65a7cb?d=identicon&s=25 Heesob Park (phasis)
on 2009-04-16 06:45
(Received via mailing list)
2009/4/16 Petr Janda <elekktretterr@exemail.com.au>:
> /usr/local/lib/ruby/gems/1.9/gems/gruff-0.3.4/lib/gruff/mini/legend.rb:72:
> syntax error, unexpected $end, expecting ':'
> ...ength < label.to_s.length ? "â¦" : '')
>
> This is the gruff code:
>
> truncated_label + (truncated_label.length < label.to_s.length ? "â^À¦" :
> '')
>
> What does a^A do?
>
It represents Horizontal Ellipsis "…" == "\xE2\x80\xA6" == "\u2026"


> Is this hidden Japanese or something?
>
It is just a comment to signal that the file is binary.

Refer to http://www.mactech.com/articles/mactech/Vol.15/15....

Regards,

Park Heesob
40920c2420f2ed4841ff4ed2fc34c99f?d=identicon&s=25 Petr Janda (petrjanda)
on 2009-04-16 07:03
> It represents Horizontal Ellipsis "…" == "\xE2\x80\xA6" == "\u2026"
>
>
>> Is this hidden Japanese or something?
>>
> It is just a comment to signal that the file is binary.
>
> Refer to http://www.mactech.com/articles/mactech/Vol.15/15....
>
> Regards,
>
> Park Heesob

Hi,

And how do I write those if my keyboard doesnt support them?
666b4e17b4bb0e2d999037a25f65a7cb?d=identicon&s=25 Heesob Park (phasis)
on 2009-04-16 07:27
(Received via mailing list)
2009/4/16 Petr Janda <elekktretterr@exemail.com.au>:
>>
>> Park Heesob
>
> Hi,
>
> And how do I write those if my keyboard doesnt support them?
Write those with escape sequences.

 "\xE2\x80\xA6" and "\xE2\xE3\xCF\xD3"


Regards,

Park Heesob
This topic is locked and can not be replied to.