lib/bunch/file_node.rb in bunch-0.0.1 vs lib/bunch/file_node.rb in bunch-0.0.2
- old
+ new
@@ -3,10 +3,10 @@
attr_reader :name, :target_extension
def initialize(fn)
@filename = fn
- if fn =~ %r(\.([^/]*?)$)
+ if fn =~ %r(\.([^.]*)$)
@name = File.basename($`)
@target_extension = $1
else
@name = File.basename(@filename)
end