mirror of
				https://github.com/red-data-tools/YouPlot.git
				synced 2025-10-31 16:28:17 +08:00 
			
		
		
		
	Make tests pass in Ruby 2.4
This commit is contained in:
		| @@ -18,7 +18,7 @@ module YouPlot | ||||
|             # compare values | ||||
|             r = b[1] <=> a[1] | ||||
|             # If the values are the same, compare by name | ||||
|             r = a[0] <=> b[0] if r == 0 | ||||
|             r = a[0] <=> b[0] if r.zero? | ||||
|             r | ||||
|           end | ||||
|           .transpose | ||||
|   | ||||
| @@ -14,7 +14,7 @@ module YouPlot | ||||
|  | ||||
|       # Remove blank lines | ||||
|       arr.delete_if do |i| | ||||
|         i == [] or i.all? nil | ||||
|         i == [] or i.all?(&:nil?) | ||||
|       end | ||||
|  | ||||
|       # get header | ||||
|   | ||||
| @@ -12,7 +12,7 @@ module YouPlot | ||||
|     :progressive, | ||||
|     :encoding, | ||||
|     :color_names, | ||||
|     :debug, | ||||
|     keyword_init: true | ||||
|     :debug | ||||
|     # keyword_init: true | ||||
|   ) | ||||
| end | ||||
|   | ||||
| @@ -15,16 +15,16 @@ module YouPlot | ||||
|       @command = nil | ||||
|  | ||||
|       @options = Options.new( | ||||
|         delimiter: "\t", | ||||
|         transpose: false, | ||||
|         headers: nil, | ||||
|         pass: false, | ||||
|         output: $stderr, | ||||
|         fmt: 'xyy', | ||||
|         progressive: false, | ||||
|         encoding: nil, | ||||
|         color_names: false, | ||||
|         debug: false | ||||
|         "\t",    # elimiter: | ||||
|         false,   # transpose: | ||||
|         nil,     # headers: | ||||
|         false,   # pass: | ||||
|         $stderr, # output: | ||||
|         'xyy',   # fmt: | ||||
|         false,   # progressive: | ||||
|         nil,     # encoding: | ||||
|         false,   # color_names: | ||||
|         false    # debug: | ||||
|       ) | ||||
|  | ||||
|       @params = Parameters.new | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kojix2
					kojix2