mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Fix calling to_yaml on 1.9
This commit is contained in:
		
							
								
								
									
										2
									
								
								Rakefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Rakefile
									
									
									
									
									
								
							| @@ -11,7 +11,7 @@ end | ||||
| file 'lib/linguist/classifier.yml' => Dir['samples/**/*'] do |f| | ||||
|   require 'linguist/sample' | ||||
|   classifier = Linguist::Sample.classifier | ||||
|   File.open(f.name, 'w') { |io| YAML.dump(classifier, io) } | ||||
|   File.open(f.name, 'w') { |io| classifier.to_yaml(io) } | ||||
| end | ||||
|  | ||||
| CLOBBER.include 'lib/linguist/classifier.yml' | ||||
|   | ||||
| @@ -170,7 +170,7 @@ module Linguist | ||||
|       @tokens.sort.each do |language, tokens| | ||||
|         data << "  #{{language => true}.to_yaml.lines.to_a[1].sub(/ true/, "")}" | ||||
|         tokens.sort.each do |token, count| | ||||
|           data << "    #{{token => count}.to_yaml.lines.to_a[1]}" | ||||
|           data << "    #{{token => count}.to_yaml.lines.to_a[1].sub(/! /, "")}" | ||||
|         end | ||||
|       end | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user