Forum: Ruby "numeric literal without digits" rake update_po error

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.
Ccabb74f5b1d303f9fda0b59ecc8a289?d=identicon&s=25 Maxime Curioni (Guest)
on 2006-06-04 01:08
First off, I am using ruby 1.8.4 installed under Ubuntu Breezy Badger,
with ruby-gettext 1.5.0 installed as a gem.

I have found a weird behavior with rgettext parsing certain .rb files.
Whenever rgettext encounters a file containing an array whose first
element is being accessed in the code, I get the following error:
"numeric literal without digits"

For example, if I include the following code:
// test.rb
line
...
10     a = [1,2]
11     a[0]
...

and I run :
> rgettext test.rb

I get the following result

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE
package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2006-06-04 00:47+0200\n"
"PO-Revision-Date: 2006-06-04 00:47+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
numeric literal without digits
Exit 1


If I remove that piece of code, it all runs smoothly.

Would anyone know what that error could be caused by ? Is there any way
to fix it ?
9fe908f5593444a40be14a424c372e58?d=identicon&s=25 Masao Mutoh (Guest)
on 2006-06-04 06:25
(Received via mailing list)
Hi,

Your problem is similer with this FAQ:
http://www.yotabanana.com/hiki/?ruby-gettext-faq#r....

Actually, your code works on my linux box.
% ruby -v
ruby 1.8.4 (2005-12-24) [i686-linux]

Confirm your ruby version again ?

On Sun, 4 Jun 2006 08:08:33 +0900
Ccabb74f5b1d303f9fda0b59ecc8a289?d=identicon&s=25 Maxime Curioni (Guest)
on 2006-06-04 17:52
> Hi,
>
> Your problem is similer with this FAQ:
> 
http://www.yotabanana.com/hiki/?ruby-gettext-faq#r....
>
> Actually, your code works on my linux box.
> % ruby -v
> ruby 1.8.4 (2005-12-24) [i686-linux]
>
> Confirm your ruby version again ?

I am on ruby 1.8.4:
> ruby -v
ruby 1.8.4 (2005-12-24) [x86_64-linux]

I am on AMD64. Is this the problem ?
39f85b1ab2f9c10f353b77d6b7e1e1c1?d=identicon&s=25 stuart yarus (Guest)
on 2006-06-04 20:39
(Received via mailing list)
On 6/4/06, Maxime Curioni <mxcurioni@gmail.com> wrote:
>
> I am on ruby 1.8.4:
> > ruby -v
> ruby 1.8.4 (2005-12-24) [x86_64-linux]
>
> I am on AMD64. Is this the problem ?

Maybe not.  Your code as posted works fine for me, and:

$ uname -a
Linux monarch 2.6.9-1.667smp #1 SMP Tue Nov 2 15:09:11 EST 2004 x86_64
x86_64 x86_64 GNU/Linux
$ ruby -v
ruby 1.8.4 (2005-12-24) [x86_64-linux]

and I'm using gettext (1.5.0)

Stuart
Ccabb74f5b1d303f9fda0b59ecc8a289?d=identicon&s=25 Maxime Curioni (Guest)
on 2006-06-05 00:51
I guess there must be something wrong with my configuration. The ruby
binary compiled for my distrib is probably at fault. I'll see in the
future if I have the same problem again.

Thanks for your help.
This topic is locked and can not be replied to.