lib/WorkingHours.rb in taskjuggler-0.0.3 vs lib/WorkingHours.rb in taskjuggler-0.0.4

- old
+ new

@@ -1,11 +1,11 @@ #!/usr/bin/env ruby -w # encoding: UTF-8 # # = WorkingHours.rb -- The TaskJuggler III Project Management Software # -# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org> +# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # @@ -147,11 +147,11 @@ # Copy the values from the given object. @timezone = wh.timezone 7.times do |day| hours = [] wh.days[day].each do |hrs| - hours << hrs.clone + hours << hrs.dup end setWorkingHours(day, hours) end end end @@ -304,10 +304,10 @@ if @timezone oldTimezone = ENV['tz'] ENV['tz'] = @timezone end - localDate = date.clone + localDate = date.dup localDate.localtime # Restore environment if oldTimezone ENV['tz'] = oldTimezone