PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3?

Réponse
 
LinkBack Outils de la discussion
Vieux 18/06/2008, 18h14   #1
Song Ma
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3?

[Note: parts of this message were removed to make it a legal post.]

Hi,

I was running the test cases from Rails 1.2.6 Action Pack. The full text
of test is here<http://svn.rubyonrails.org/rails/branches/1-2-stable/actionpack/test/controller/test_test.rb>.
There is one case like this:

def test_process_with_session_arg
process :no_op, nil, { 'string' => 'value1', :symbol => 'value2' }
assert_equal 'value1', session['string']
assert_equal 'value1', session[:string]
assert_equal 'value2', session['symbol']
assert_equal 'value2', session[:symbol]
end
I was using JRuby 1.0.3 on a UNIX platform, to my surprised this case only
first assert passed and all other three failed. The error message says
"<value1> expected but was <nil>"

After I changed ":symbol => 'value2' " to " 'symbol' => 'value2' ", assert 1
and 3 passed but 2 and 4 were always failed. The error message was the same.

These tests were passed on my Gentoo box with JRuby 1.0.3. The JVM are the
same Java5.0.

What could be wrong for it? Theoratically JRuby is platform independent and
I was using the same version of JVM on both UNIX and Gentoo. Why 'symbol'
works but :symbol failed?

Thanks,
Song Ma

  Réponse avec citation
Vieux 19/06/2008, 22h10   #2
Roger Pack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Why ":symbol" failed but 'symbol' successed with JRuby 1

> What could be wrong for it? Theoratically JRuby is platform independent
> and
> I was using the same version of JVM on both UNIX and Gentoo. Why
> 'symbol'
> works but :symbol failed?

might want to ask the jruby group
-R
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 20/07/2008, 05h08   #3
Charles Oliver Nutter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3?

Song Ma wrote:
> Hi,
>
> I was running the test cases from Rails 1.2.6 Action Pack. The full text
> of test is here<http://svn.rubyonrails.org/rails/branches/1-2-stable/actionpack/test/controller/test_test.rb>.
> There is one case like this:
>
> def test_process_with_session_arg
> process :no_op, nil, { 'string' => 'value1', :symbol => 'value2' }
> assert_equal 'value1', session['string']
> assert_equal 'value1', session[:string]
> assert_equal 'value2', session['symbol']
> assert_equal 'value2', session[:symbol]
> end
> I was using JRuby 1.0.3 on a UNIX platform, to my surprised this case only
> first assert passed and all other three failed. The error message says
> "<value1> expected but was <nil>"
>
> After I changed ":symbol => 'value2' " to " 'symbol' => 'value2' ", assert 1
> and 3 passed but 2 and 4 were always failed. The error message was the same.
>
> These tests were passed on my Gentoo box with JRuby 1.0.3. The JVM are the
> same Java5.0.


You really ought to be using JRuby 1.1.x...1.0.3 is the last maintenance
release to 1.0 and that line has not seen any updates in over a year.
1.1 just had a 1.1.3 release that's worlds better as far as
compatibility and far faster. If this bug still exists in JRuby 1.1.3,
please file an issue for it

http://jira.codehaus.org/browse/JRUBY

- Charlie

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h29.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08795 seconds with 11 queries