flog 4.9.2 → 4.9.3

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: 79aa339ba2ed65cdd83437fad88ae503bff7a4392255d9dd9920e2ca400d164d
4
- data.tar.gz: 6b69169958fec009c2b6e106d98089d4a581821bf26f6568a488d91bb0043abf
3
+ metadata.gz: 8031dfa607d41e264121a14a84f9798425b87dffdce2a5bd8cabf15a6836e0f8
4
+ data.tar.gz: 95a6b848cbe35d02bae912cf8bd4871998b94bb9faeedc9f92a099c8b565f06a
5
5
  SHA512:
6
- metadata.gz: 21d6a21c74691972cb98cec49cbe1289b5c870d6874d1606b4c2451431e3ec63d261f22a235927b80ffeea15273bb1d31a6aa18530fdbb346ca5e74e882ec94f
7
- data.tar.gz: e713d2e30e361ac522f889d77efd0f291a6f38c47fb3c84c777c8879f770fc928e7e919318e816eca9c8347e110b1591edb17b4b3a5863ad17bc9f43279557f5
6
+ metadata.gz: 0dc58926910d69b830974eeb0e9cac686fdcd8a49ee6f678e23f557daeb124d09568c7fe293d4b37cb5e6282de37f5ab6489b6d4ae0099b323445196511917d8
7
+ data.tar.gz: c7b1ea584cad2c550c1020057fe22ebfb6ed449705de797d0313cb87a7b90e479003f59055dd4889102159a42ba1efd0dc532c972688d1a421436e17d8dc3fed
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- k2Rm�����ᄶ��}�ȪT ��6��٨�I>{@����q��K�]��qᗽ5L��\[�ԥѕ��1Kn����:��Y����(
2
- ���Y.����u8�M 5H ~` Զ�֝5ώqA�RoO7�&��(��\�d���~?t�4KM�BB0� Z������2�w�%��N/�Dì��7��P��~�O��&zXls��t�g��,"�a��]4R�xڼIy{A��BG�P�~���Fk��?���8-���˓
1
+ η�LX����X2�+�?�s�%Q\�� C9j���V!�_�]�������{,j(-LpɫN�L���p͊2���}���8^�g�^6��>���9D��\0����j��6���ϕz9d�������{��t)=��Z���{�d�� u�$��GZ��b� ��$�R@� \]����*U �>�i�A��>�ݺ�E�nSn��n |�nzQg
2
+ ,��%,~�y:L_�����RkԊNi ���!c66�h
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 4.9.3 / 2026-01-05
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed bug caused by last release duplicating (frozen) options hash. (nateberkopec)
6
+
1
7
  === 4.9.2 / 2026-01-04
2
8
 
3
9
  * 2 bug fixes:
data/lib/flog.rb CHANGED
@@ -16,7 +16,7 @@ NotRubyParser = Class.new Prism::Translation::RubyParser
16
16
  # thoroughly test.
17
17
 
18
18
  class Flog < MethodBasedSexpProcessor
19
- VERSION = "4.9.2" # :nodoc:
19
+ VERSION = "4.9.3" # :nodoc:
20
20
 
21
21
  ##
22
22
  # Cut off point where the report should stop unless --all given.
@@ -230,7 +230,7 @@ class Flog < MethodBasedSexpProcessor
230
230
 
231
231
  def initialize option = {}
232
232
  super()
233
- @option = option.dup
233
+ @option = option = option.dup
234
234
  @mass = {}
235
235
  @parser = nil
236
236
  @threshold = option[:threshold] || DEFAULT_THRESHOLD
data/test/test_flog.rb CHANGED
@@ -697,3 +697,15 @@ class TestFlog < FlogTest
697
697
  @flog.add_to_score "blah", 42
698
698
  end
699
699
  end
700
+
701
+ class TestFlogDefaultOptions < Minitest::Test
702
+ def test_flog_with_default_options
703
+ # Regression test for issue #84
704
+ # Flog should work with default options (no explicit parser)
705
+ flog = Flog.new
706
+ flog.flog_ruby "2 + 3", "test.rb"
707
+ flog.calculate_total_scores
708
+
709
+ assert_in_epsilon 1.6, flog.total_score
710
+ end
711
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flog
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.2
4
+ version: 4.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
metadata.gz.sig CHANGED
Binary file