Skip to content

Commit 009738a

Browse files
committed
CI on Ruby 3.4. Ruby < 3.4 requires float/double values to end in a digit.
1 parent 56f84b6 commit 009738a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
ruby: ['3.0', 3.1, 3.2, 3.3, ruby-head, jruby]
28+
ruby: ['3.0', 3.1, 3.2, 3.3, 3.4, ruby-head, jruby]
2929
steps:
3030
- name: Clone repository
3131
uses: actions/checkout@v3

lib/rdf/model/literal/double.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def initialize(value, datatype: nil, lexical: nil, **options)
2626
when 'INF' then 1/0.0
2727
when '-INF' then -1/0.0
2828
when 'NAN' then 0/0.0
29-
else Float(value.sub(/\.[eE]/, '.0E')) rescue nil
29+
else Float(value.sub(/\.[eE]/, '.0E').sub(/\.$/, '.0')) rescue nil
3030
end
3131
when value.is_a?(::Float) then value
3232
when value.respond_to?(:to_f) then value.to_f

0 commit comments

Comments
 (0)