You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2025/08/08 05:16:58 UTC
(arrow) branch main updated: GH-47265: [Ruby] Fix wrong `Time` object detection (#47267)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 97d7cdb9da GH-47265: [Ruby] Fix wrong `Time` object detection (#47267)
97d7cdb9da is described below
commit 97d7cdb9daef4f0e2bd050b2c032413d8697ae02
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Aug 8 14:16:51 2025 +0900
GH-47265: [Ruby] Fix wrong `Time` object detection (#47267)
### Rationale for this change
We can't use `Time` to refer `::Time` in `Arrow` namespace because there is `Arrow::Time`.
### What changes are included in this PR?
Use `::Time` to refer the top-level `Time`.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* GitHub Issue: #47265
Authored-by: Sutou Kouhei <ko...@clear-code.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
ruby/red-arrow/lib/arrow/timestamp-array-builder.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruby/red-arrow/lib/arrow/timestamp-array-builder.rb b/ruby/red-arrow/lib/arrow/timestamp-array-builder.rb
index c1284aca3d..92dc71fd49 100644
--- a/ruby/red-arrow/lib/arrow/timestamp-array-builder.rb
+++ b/ruby/red-arrow/lib/arrow/timestamp-array-builder.rb
@@ -30,7 +30,7 @@ module Arrow
end
def convert_to_arrow_value(value)
- if value.respond_to?(:to_time) and not value.is_a?(Time)
+ if value.respond_to?(:to_time) and not value.is_a?(::Time)
value = value.to_time
end