From 03bb750d5654f4ff4890fd1d39e680ac0860340f Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 17 Jul 2010 15:03:31 +0000 Subject: * ext/pathname/lib/pathname.rb (Pathname#initialize): removed. * ext/pathname/pathname.c (path_initialize): implemented. (get_strpath): new function. (set_strpath): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pathname/lib/pathname.rb | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'ext/pathname/lib/pathname.rb') diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb index b150a31f69..54be13868f 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -208,21 +208,6 @@ class Pathname # :startdoc: - # - # Create a Pathname object from the given String (or String-like object). - # If +path+ contains a NUL character (\0), an ArgumentError is raised. - # - def initialize(path) - path = path.__send__(TO_PATH) if path.respond_to? TO_PATH - @path = path.dup - - if /\0/ =~ @path - raise ArgumentError, "pathname contains \\0: #{@path.inspect}" - end - - self.taint if @path.tainted? - end - def freeze() super; @path.freeze; self end def taint() super; @path.taint; self end def untaint() super; @path.untaint; self end -- cgit v1.2.3