]> granicus.if.org Git - file/commitdiff
ruby: make hash-bang magic take precedence over text matches
authorReuben Thomas <rrt@sc3d.org>
Wed, 27 Jul 2016 09:46:29 +0000 (09:46 +0000)
committerReuben Thomas <rrt@sc3d.org>
Wed, 27 Jul 2016 09:46:29 +0000 (09:46 +0000)
In particular, precedence over incomplete matches that produce no text

magic/Magdir/ruby

index 26630f3a8202d834b6f6085acf533bd2c1383cf4..cc3abd0408aee36ddbefbeac151fcd30b0c2af5c 100644 (file)
@@ -1,18 +1,22 @@
 
 #------------------------------------------------------------------------------
-# $File: ruby,v 1.5 2010/07/21 16:47:17 christos Exp $
+# $File: ruby,v 1.6 2016/07/27 09:46:29 rrt Exp $
 # ruby:  file(1) magic for Ruby scripting language
 # URL:  http://www.ruby-lang.org/
 # From: Reuben Thomas <rrt@sc3d.org>
 
 # Ruby scripts
 0      search/1/w      #!\ /usr/bin/ruby       Ruby script text executable
+!:strength + 15
 !:mime text/x-ruby
 0      search/1/w      #!\ /usr/local/bin/ruby Ruby script text executable
+!:strength + 15
 !:mime text/x-ruby
 0      search/1        #!/usr/bin/env\ ruby    Ruby script text executable
+!:strength + 15
 !:mime text/x-ruby
 0      search/1        #!\ /usr/bin/env\ ruby  Ruby script text executable
+!:strength + 15
 !:mime text/x-ruby
 
 # What looks like ruby, but does not have a shebang