M
Martin DeMello
When converting a Win32/Ruby application to JRuby, I ran into an
interesting quirk - the Windows Ruby interpreter (1.8.6 from the
one-click installer) let me "get away" with whatever mix of upper and
lower case I liked when accessing environment variables (e.g.
ENV['UserProfile'], ENV['userprofile'], ENV["USERPROFILE"], etc),
which is consistent with the way Windows itself does it. JRuby seems
to follow the Unix model where UserProfile and USERPROFILE are two
separate variables.
I raise this here rather than filing a bug with the JRuby team because
I am unsure as to what the correct behaviour is - are JRuby
environment variables a property of the JVM, and only incidentally a
property of the underlying operating system that the JVM picked them
up from, or should they accurately return the same results that MRI
would have?
martin
interesting quirk - the Windows Ruby interpreter (1.8.6 from the
one-click installer) let me "get away" with whatever mix of upper and
lower case I liked when accessing environment variables (e.g.
ENV['UserProfile'], ENV['userprofile'], ENV["USERPROFILE"], etc),
which is consistent with the way Windows itself does it. JRuby seems
to follow the Unix model where UserProfile and USERPROFILE are two
separate variables.
I raise this here rather than filing a bug with the JRuby team because
I am unsure as to what the correct behaviour is - are JRuby
environment variables a property of the JVM, and only incidentally a
property of the underlying operating system that the JVM picked them
up from, or should they accurately return the same results that MRI
would have?
martin