Skip to content

Commit

Permalink
Update comments regarding JRuby comparisons.
Browse files Browse the repository at this point in the history
  • Loading branch information
philr committed Feb 9, 2014
1 parent a044763 commit 427d6e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_utils.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#--
# Copyright (c) 2008-2013 Philip Ross
# Copyright (c) 2008-2014 Philip Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -136,11 +136,11 @@ def assert_sub_process_returns(expected_lines, code, extra_load_path = [], requi
end
end

# JRuby 1.7.5 and later consider DateTime instances that differ by less than
# JRuby 1.7.5 to 1.7.9 consider DateTime instances that differ by less than
# 1 millisecond to be equivalent (https://github.com/jruby/jruby/issues/1311).
#
# A few test cases compare at a resolution of 1 microsecond, so this causes
# failures on JRuby 1.7.5.
# failures on JRuby 1.7.5 to 1.7.9.
#
# Determine what the platform supports and adjust the tests accordingly.
DATETIME_RESOLUTION = (0..5).collect {|i| 10**i}.find {|i| (DateTime.new(2013,1,1,0,0,0) <=> DateTime.new(2013,1,1,0,0,Rational(i,1000000))) < 0}
Expand Down

0 comments on commit 427d6e1

Please sign in to comment.