[ruby-cvs:68940] mame:r61759 (trunk): spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected result

mame at ruby-lang.org mame at ruby-lang.org
Wed Jan 10 22:30:22 JST 2018


mame	2018-01-10 22:30:22 +0900 (Wed, 10 Jan 2018)

  New Revision: 61759

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61759

  Log:
    spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected result
    
    It had used `id -un`, but it is not always equal to `Etc.getlogin`.
    `id` returns the current user of the process, and `Etc.getlogin` returns
    the user name logged in on the controlling terminal of the process.
    
    This change uses `logname` by default.  `id` remains as a fallback since
    there seem to be some platforms where `logname` is not available:
    https://github.com/ruby/spec/commit/49576b417ca3704cfb8271d2545c06c076c10cbc

  Modified files:
    trunk/spec/ruby/library/etc/getlogin_spec.rb


More information about the ruby-cvs mailing list