JRuby's Signal pollutes Kernel namespace with signal-specific constants
-----------------------------------------------------------------------
Key: JRUBY-2279
URL: http://jira.codehaus.org/browse/JRUBY-2279
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.1RC2
Environment: Latest JRuby 1.1RC2
Reporter: Vladimir Sizikov
Assignee: Thomas E Enebo
In MRI, Kernel.constants returns empty array.
In JRuby, by default, as well.
But, once the Signal is used, or 'jsignal' is required, it pollutes the Kernel
constants:
Kernel.constants => ["JavaSignal", "SIGNALS"]
This also leads to one rubyspec failure:
{noformat}
Module#constants returns an array with the names of all accessible constants
FAILED
Expected ["JavaSignal", "A", "SIGNALS"]
to equal ["A"]
/opt/work/rubinius/./mspec/expectations.rb:10:in `fail_with'
/opt/work/rubinius/./mspec/matchers/base.rb:8:in `=='
/opt/work/rubinius/./spec/ruby/1.8/core/module/constants_spec.rb:18
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:59:in `process'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `process'
/opt/work/rubinius/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rubinius/./mspec/runner/object.rb:11:in `describe'
/opt/work/rubinius/./spec/ruby/1.8/core/module/constants_spec.rb:12
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `load'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `each'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-ci:59
{noformat}
Ideally, such important visible namespaces should not be polluted with internal
implementation details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email