mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/rdoc/rdoc.rb (parse_files): interpret coding cookie.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									6ca558d6ab
								
							
						
					
					
						commit
						8db7c837f9
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
Tue Dec 25 01:42:41 2007  Tanaka Akira  <akr@fsij.org>
 | 
			
		||||
 | 
			
		||||
	* lib/rdoc/rdoc.rb (parse_files): interpret coding cookie.
 | 
			
		||||
 | 
			
		||||
Tue Dec 25 01:38:04 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* proc.c (method_name): preserve Symbol's encoding.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -220,6 +220,11 @@ module RDoc
 | 
			
		|||
        $stderr.printf("\n%35s: ", File.basename(fn)) unless options.quiet
 | 
			
		||||
        
 | 
			
		||||
        content = File.open(fn, "r") {|f| f.read}
 | 
			
		||||
        if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/]
 | 
			
		||||
          if enc = Encoding.find($1)
 | 
			
		||||
            content.force_encoding(enc)
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        top_level = TopLevel.new(fn)
 | 
			
		||||
        parser = ParserFactory.parser_for(top_level, fn, content, options, @stats)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue