S
Song Ma
[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
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