Permalink
Browse files

Fix for Ruby 1.9

  • Loading branch information...
1 parent 52d57fc commit ddb4db240069ef0b9233d64780aac146ccf7c454 @bklang bklang committed Dec 31, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 script/txt2html
View
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+$:.push File.join(File.dirname(__FILE__), '..')
require 'rubygems'
begin
@@ -22,9 +23,9 @@ class Fixnum
return 'th' if (10..19).include?(self % 100)
# others
case self % 10
- when 1: return 'st'
- when 2: return 'nd'
- when 3: return 'rd'
+ when 1 then return 'st'
+ when 2 then return 'nd'
+ when 3 then return 'rd'
else return 'th'
end
end

0 comments on commit ddb4db2

Please sign in to comment.