From c02ce5aab0fa6d98b4f24b0af146b15f482ef91e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Joubert?= Date: Mon, 26 Oct 2026 18:50:03 +0300 Subject: [PATCH] Remove the ruby < 2.3 condition of the binary timestamp decoder pg requires ruby-3.1 since #749, so only the time_t conditions remain. --- ext/pg_binary_decoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/pg_binary_decoder.c b/ext/pg_binary_decoder.c index 0e299e484..ed8261905 100644 --- a/ext/pg_binary_decoder.c +++ b/ext/pg_binary_decoder.c @@ -4,7 +4,6 @@ * */ -#include "ruby/version.h" #include "pg.h" #include "pg_util.h" #ifdef HAVE_INTTYPES_H @@ -327,7 +326,7 @@ pg_bin_dec_timestamp(t_pg_coder *conv, const char *val, int len, int tuple, int sec = (timestamp / 1000000) + 10957L * 24L * 3600L; nsec = (timestamp % 1000000) * 1000; -#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && RUBY_API_VERSION_MINOR >= 3)) && defined(NEGATIVE_TIME_T) && defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8 +#if defined(NEGATIVE_TIME_T) && defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8 /* Fast path for time conversion */ { struct timespec ts = {sec, nsec};