Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Sync fork #6

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

Sync fork #6

wants to merge 34 commits into from

Conversation

hmsf
Copy link

@hmsf hmsf commented Apr 12, 2024

No description provided.

wkirschbaum and others added 26 commits August 10, 2018 08:39
Include patch versions for activesupport 5.2
BigDecimal is now a method in the Kernel module.
BigDecimal.new will spit deprecation warnings
update BigDecimal constructor for ruby 2.6
Allowing higher version of activesupport
using xirr.config instead of constants
@hmsf hmsf marked this pull request as ready for review April 12, 2024 15:10
For some reason the commit added (0c89d72) to remove RubyInline is not the same as PR #24, and a require was left in the code.

That require fails, as the dependency is no longer specified. And that makes the test to fail:

```
$ bundle exec rake test_units
/Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- inline (LoadError)
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/coder/code/xirr/lib/xirr/base.rb:7:in `<module:Base>'
	from /Users/coder/code/xirr/lib/xirr/base.rb:5:in `<module:Xirr>'
	from /Users/coder/code/xirr/lib/xirr/base.rb:3:in `<top (required)>'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/coder/code/xirr/test/test_helper.rb:12:in `<top (required)>'
	from /Users/coder/code/xirr/test/test_cashflow.rb:1:in `require_relative'
	from /Users/coder/code/xirr/test/test_cashflow.rb:1:in `<top (required)>'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:21:in `block in <main>'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:6:in `select'
	from /Users/coder/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:6:in `<main>'
rake aborted!
Command failed with status (1)
/Users/coder/.rbenv/versions/3.3.1/bin/bundle:25:in `load'
/Users/coder/.rbenv/versions/3.3.1/bin/bundle:25:in `<main>'
Tasks: TOP => test_units
(See full trace by running task with --trace)
```

After the change, the tests are working again.

PS: in a later PR I will be configuring Github Actions for this repo.
sk- and others added 7 commits April 30, 2024 14:02
Without the patch number `rbenv` was failing with the following error:

```
$ rbenv install
ruby-build: definition not found: 3.3

The following versions contain `3.3' in the name:
  2.3.3
  3.3.0-dev
  3.3.0-preview1
  3.3.0-preview2
  3.3.0-preview3
  3.3.0-rc1
  3.3.0
  3.3.1
  jruby-9.3.3.0
  mruby-3.3.0
  rbx-3.3
  rbx-3.30
  rbx-3.31
  rbx-3.32
  rbx-3.33
  rbx-3.34
  rbx-3.35
  rbx-3.36
  rbx-3.37
  rbx-3.38
  rbx-3.39

See all available versions with `rbenv install --list-all'.

If the version you need is missing, try upgrading ruby-build:

  brew upgrade ruby-build
```
In this PR we allow activesupport 7 and remove support for versions 5 and 6.0 as the latter reached its EOL on June 2022. We also require Ruby 3.1, as Ruby 3.0 reached its EOL on April 23rd 2024 and Ruby 2.7 on March 31st 2023.

This fixes #30.
fix: remove require of RubyInline
fix: specify patch version in .ruby-version
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants