sec_id 4.4.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1a703602defc67f745ab0994c73f61d964ed1047a029cc01c2cf7edcda82045
4
- data.tar.gz: cf7a004bb992ceb3a9991946d09c908a76d13852c7a87a0b2527a4633da869be
3
+ metadata.gz: 20409e751f968646b7679c2b252f4e1271be9bfd718594623cf2ac7d45c11db3
4
+ data.tar.gz: c65e3bcb5f6196543873c19ed845c29b77e4caec3c473bb74c7457eb42ab0369
5
5
  SHA512:
6
- metadata.gz: c4e726ce2c1cd7b64dc6d2f8db7e284166ff0229eef52f064975d244e766e28ba239dd8f39dc1730e3b092ae0e57cf982adb683711cde6dd9b15a4bc8c88eb09
7
- data.tar.gz: '0986116c63812cc37af215b4f564e3db44d4ea154d90dc49a99e82096fe18e099277087a2b399920e2bf03acbdc69d098b6442c2195d434f2af3230cffe2b257'
6
+ metadata.gz: ea451044dbeee4c685ea90300cdb4b3f4704b58a9966cdae579992b969bf79bab5a0781693ec4f59a7ec32050a2b197827f6b932eb460b7cfc5e145636815d43
7
+ data.tar.gz: e7c691adedcdc482580adc6ccd11fa445dcd6414a56ed5b0f31c1496fc54af0eece6259791a791b9c44682b0204b6e4c7d01befe664fa79f63d00ff11efa9e22
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [4.4.1] - 2026-02-05
12
+
13
+ ### Fixed
14
+
15
+ - `CUSIP#to_isin` and `SEDOL#to_isin` no longer mutate source instance when check digit is missing ([#127](https://github.com/svyatov/sec_id/issues/127))
16
+
11
17
  ## [4.4.0] - 2026-01-29
12
18
 
13
19
  ### Added
data/lib/sec_id/cusip.rb CHANGED
@@ -55,8 +55,8 @@ module SecId
55
55
  raise(InvalidFormatError, "'#{country_code}' is not a CGS country code!")
56
56
  end
57
57
 
58
- restore!
59
- isin = ISIN.new(country_code + full_number)
58
+ cusip_with_check_digit = "#{identifier}#{check_digit || calculate_check_digit}"
59
+ isin = ISIN.new(country_code + cusip_with_check_digit)
60
60
  isin.restore!
61
61
  isin
62
62
  end
data/lib/sec_id/sedol.rb CHANGED
@@ -45,8 +45,8 @@ module SecId
45
45
  raise InvalidFormatError, "'#{country_code}' is not a valid SEDOL country code!"
46
46
  end
47
47
 
48
- restore!
49
- isin = ISIN.new("#{country_code}00#{full_number}")
48
+ sedol_with_check_digit = "#{identifier}#{check_digit || calculate_check_digit}"
49
+ isin = ISIN.new("#{country_code}00#{sedol_with_check_digit}")
50
50
  isin.restore!
51
51
  isin
52
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SecId
4
- VERSION = '4.4.0'
4
+ VERSION = '4.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sec_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Svyatov