File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 44
55gem "rake"
66gem "rake-compiler"
7- gem "minitest" , ">= 5"
7+ gem "minitest"
88gem "vega"
9- gem "ruby_memcheck"
9+ gem "ruby_memcheck" , require : false
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ Decompose a time series
1818
1919``` ruby
2020series = {
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
Original file line number Diff line number Diff line change @@ -3,25 +3,26 @@ require "rake/testtask"
33require "rake/extensiontask"
44require "ruby_memcheck"
55
6- task default : :test
76test_config = lambda do |t |
8- t . libs << "test"
97 t . pattern = "test/**/*_test.rb"
108end
11- Rake ::TestTask . new ( :test , &test_config )
9+ Rake ::TestTask . new ( &test_config )
1210
1311namespace :test do
1412 RubyMemcheck ::TestTask . new ( :valgrind , &test_config )
1513end
1614
15+ task default : :test
16+
1717Rake ::ExtensionTask . new ( "stl" ) do |ext |
1818 ext . name = "ext"
1919 ext . lib_dir = "lib/stl"
2020end
2121
2222task :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
2526end
2627
2728Rake ::Task [ "build" ] . enhance [ :remove_ext ]
Original file line number Diff line number Diff line change 1+ #include < vector>
2+
13#include < rice/rice.hpp>
24#include < rice/stl.hpp>
35
68Rice::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}
You can’t perform that action at this time.
0 commit comments