lib/schedulability/parser.rb in schedulability-0.4.1 vs lib/schedulability/parser.rb in schedulability-0.5.0
- old
+ new
@@ -1,7 +1,7 @@
# -*- ruby -*-
-#encoding: utf-8
+# frozen_string_literal: true
require 'loggability'
require 'schedulability' unless defined?( Schedulability )
@@ -60,10 +60,10 @@
def stringify( periods )
strings = []
periods.each do |period|
period_string = []
period.sort_by{|k, v| k}.each do |scale, ranges|
- range_string = ""
+ range_string = String.new( encoding: 'utf-8' )
range_string << "%s { " % [ scale.to_s ]
range_strings = ranges.each_with_object( [] ).each do |range, acc|
if range.min == range.max
acc << range.min