[1.9] Dir.home should be defined
--------------------------------
Key: JRUBY-4167
URL: http://jira.codehaus.org/browse/JRUBY-4167
Project: JRuby
Issue Type: Improvement
Components: Ruby 1.9
Affects Versions: JRuby 1.4.0RC2, JRuby 1.4, JRuby 1.5
Reporter: Hiro Asari
Assignee: Thomas E Enebo
Fix For: JRuby 1.5
Attachments: 0001-Implement-Dir.home.patch
{noformat}
surfboard:jruby[git:master]$ bin/jruby spec/mspec/bin/mspec -T--1.9
spec/ruby/core/dir/home_spec.rb
jruby 1.5.0.dev (ruby 1.9.2dev trunk 24787) (2009-10-27 cedfc82) (Java
HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
EEF
1)
Dir.home returns the current user's home directory as a string if called
without arguments ERROR
NoMethodError: undefined method `home' for Dir:Class
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:7
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:5
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:55:in `load'
2)
Dir.home returns the named user's home directory as a string if called with an
argument ERROR
NoMethodError: undefined method `home' for Dir:Class
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:11
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:5
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:55:in `load'
3)
Dir.home raises an ArgumentError if the named user doesn't exist FAILED
Expected ArgumentError
but got NoMethodError (undefined method `home' for Dir:Class)
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:15
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:5
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/dir/home_spec.rb:55:in `load'
Finished in 0.275000 seconds
1 file, 3 examples, 1 expectation, 1 failure, 2 errors
{noformat}
The attached patch implements this method.
--
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