Skip to content

Commit ed5362b

Browse files
committed
Add a comment to explain the reason we need to call original Time.at method
1 parent f8746c6 commit ed5362b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/truffle/truffle/cext.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ module Truffle::CExt
112112
LIBTRUFFLERUBY = libtruffleruby
113113
end
114114

115+
# Rails 6 overrides `Time.at` in a way that doesn't delegate keyword arguments to the original `Time.at` method.
116+
# The issue was fixed in Rails 6.1 but wasn't backported.
117+
# It causes ArgumentError exception when `rb_time_timespec_new` function is called in the `pg` gem.
118+
# See https://github.com/rails/rails/issues/47586.
115119
ORIGINAL_TIME_AT = Time.method(:at)
116120

117121
def self.register_libtruffleruby(libtruffleruby)

0 commit comments

Comments
 (0)