Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#45257 closed defect (wontfix)

ruby20: warnings from library files that differ only by case of filename

Reported by: Polyergic (Shad Sterling) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: ruby20

Description

It looks like there's at least one library file that shouldn't be there

executing this code:

#!/opt/local/bin/ruby -wU
require "Digest"
Digest::MD5.digest("!")

generates this output"

/opt/local/lib/ruby2.0/2.0.0/digest.rb:4: warning: method redefined; discarding old const_missing
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:4: warning: previous definition of const_missing was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:28: warning: method redefined; discarding old file
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:28: warning: previous definition of file was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:35: warning: method redefined; discarding old base64digest
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:35: warning: previous definition of base64digest was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:43: warning: method redefined; discarding old file
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:43: warning: previous definition of file was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:62: warning: method redefined; discarding old base64digest
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:62: warning: previous definition of base64digest was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:68: warning: method redefined; discarding old base64digest!
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:68: warning: previous definition of base64digest! was here
/opt/local/lib/ruby2.0/2.0.0/digest.rb:86: warning: method redefined; discarding old Digest
/opt/local/lib/ruby2.0/2.0.0/Digest.rb:86: warning: previous definition of Digest was here

diff -qs says Files /opt/local/lib/ruby2.0/2.0.0/digest.rb and /opt/local/lib/ruby2.0/2.0.0/Digest.rb are identical

Change History (4)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ruby lib removed
Owner: changed from macports-tickets@… to kimuraw@…
Summary: Ruby warnings from library files that differ only by case of filenamerub20: warnings from library files that differ only by case of filename

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: rub20: warnings from library files that differ only by case of filenameruby20: warnings from library files that differ only by case of filename

comment:3 Changed 10 years ago by kimuraw (kimura wataru)

Resolution: wontfix
Status: newclosed

I think this is not a problem of port:ruby20. the cause of this warnings is OS X's default filesystem called "HFS+".

  • HFS+ is a case insensitive filesystem.
    • type LS in terminal.app then runs ls. that does not mean executable file named "LS" exists.
  • port:ruby20 contains only "digest.rb".
  • you should code require "digest" not "Digest".
% port contents ruby20 | grep -i 'digest\.rb'
  /opt/local/lib/ruby2.0/2.0.0/digest.rb
  /opt/local/lib/ruby2.0/2.0.0/openssl/digest.rb
  /opt/local/lib/ruby2.0/2.0.0/webrick/httpauth/htdigest.rb

comment:4 Changed 10 years ago by Polyergic (Shad Sterling)

Huh, I guess I lost track of which language uses which capitalization convention for require/import/use/include/etc, and didn't notice the examples used all lower case. Not sure why Digest was the only module affected. Thanks.

Note: See TracTickets for help on using tickets.