mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Fix quoting of method names in regexp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									4cc67da551
								
							
						
					
					
						commit
						f40b1b2a47
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		|  | @ -1,3 +1,8 @@ | ||||||
|  | Sun Dec 28 03:50:05 2003  Dave Thomas  <dave@pragprog.com> | ||||||
|  | 
 | ||||||
|  | 	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_override_comment):  | ||||||
|  | 	  Escape method names used in regexp | ||||||
|  | 
 | ||||||
| Sun Dec 28 01:46:02 2003  Dave Thomas  <dave@pragprog.com> | Sun Dec 28 01:46:02 2003  Dave Thomas  <dave@pragprog.com> | ||||||
| 
 | 
 | ||||||
| 	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item): | 	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item): | ||||||
|  |  | ||||||
|  | @ -360,8 +360,8 @@ module RDoc | ||||||
| 
 | 
 | ||||||
|     def find_override_comment(meth_name) |     def find_override_comment(meth_name) | ||||||
|       comment = nil |       comment = nil | ||||||
|       puts "Override #{meth_name}" |       name = Regexp.escape(meth_name) | ||||||
|       if @body =~ %r{Document-method:\s#{meth_name}.*?\n((?>.*?\*/))}m |       if @body =~ %r{Document-method:\s#{name}.*?\n((?>.*?\*/))}m | ||||||
|         comment = $1 |         comment = $1 | ||||||
|       end |       end | ||||||
|       comment |       comment | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 dave
						dave