diff --git a/lib/linguist.rb b/lib/linguist.rb index f26ea441..3c25f325 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -2,3 +2,4 @@ module Linguist end require 'linguist/language' +require 'linguist/pathname' diff --git a/lib/linguist/pathname.rb b/lib/linguist/pathname.rb new file mode 100644 index 00000000..af252c6f --- /dev/null +++ b/lib/linguist/pathname.rb @@ -0,0 +1,11 @@ +module Linguist + class Pathname + def initialize(path) + @path = path + end + + def to_s + @path.dup + end + end +end diff --git a/test/test_pathname.rb b/test/test_pathname.rb new file mode 100644 index 00000000..d3f68277 --- /dev/null +++ b/test/test_pathname.rb @@ -0,0 +1,11 @@ +require 'linguist/pathname' + +require 'test/unit' + +class TestPathname < Test::Unit::TestCase + include Linguist + + def test_to_s + assert_equal "file.rb", Pathname.new("file.rb").to_s + end +end