Skip to content

Commit a99f2f8

Browse files
committed
Merge branch 'master' into valgrind
2 parents f5b0d9f + 7b18b3c commit a99f2f8

10 files changed

Lines changed: 427 additions & 105 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
os: [ubuntu-latest]
99
runs-on: ${{ matrix.os }}
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
14-
ruby-version: 3.3
14+
ruby-version: "4.0"
1515
bundler-cache: true
1616
- run: bundle exec rake compile
1717
- run: bundle exec rake test

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.1 (2025-10-26)
2+
3+
- Fixed error with Rice 4.7
4+
15
## 0.3.0 (2024-10-22)
26

37
- Dropped support for Ruby < 3.1

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ gemspec
44

55
gem "rake"
66
gem "rake-compiler"
7-
gem "minitest", ">= 5"
7+
gem "minitest"
88
gem "vega"
9-
gem "ruby_memcheck"
9+
gem "ruby_memcheck", require: false

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Decompose a time series
1818

1919
```ruby
2020
series = {
21-
Date.parse("2023-01-01") => 100,
22-
Date.parse("2023-01-02") => 150,
23-
Date.parse("2023-01-03") => 136,
21+
Date.parse("2025-01-01") => 100,
22+
Date.parse("2025-01-02") => 150,
23+
Date.parse("2025-01-03") => 136,
2424
# ...
2525
}
2626

Rakefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@ require "rake/testtask"
33
require "rake/extensiontask"
44
require "ruby_memcheck"
55

6-
task default: :test
76
test_config = lambda do |t|
8-
t.libs << "test"
97
t.pattern = "test/**/*_test.rb"
108
end
11-
Rake::TestTask.new(:test, &test_config)
9+
Rake::TestTask.new(&test_config)
1210

1311
namespace :test do
1412
RubyMemcheck::TestTask.new(:valgrind, &test_config)
1513
end
1614

15+
task default: :test
16+
1717
Rake::ExtensionTask.new("stl") do |ext|
1818
ext.name = "ext"
1919
ext.lib_dir = "lib/stl"
2020
end
2121

2222
task :remove_ext do
23-
path = "lib/stl/ext.bundle"
24-
File.unlink(path) if File.exist?(path)
23+
Dir["lib/stl/ext.{bundle,so}"].each do |path|
24+
File.unlink(path)
25+
end
2526
end
2627

2728
Rake::Task["build"].enhance [:remove_ext]

ext/stl/ext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <vector>
2+
13
#include <rice/rice.hpp>
24
#include <rice/stl.hpp>
35

@@ -6,7 +8,7 @@
68
Rice::Array to_a(std::vector<float>& x) {
79
auto a = Rice::Array();
810
for (auto v : x) {
9-
a.push(v);
11+
a.push(v, false);
1012
}
1113
return a;
1214
}

0 commit comments

Comments
 (0)