Skip to content

Commit

Permalink
Use def instead of define_singleton_method
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Dec 13, 2024
1 parent 2a49229 commit 4fc244c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/random/formatter/alphanumeric_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
before :each do
@object = Object.new
@object.extend(Random::Formatter)
@object.define_singleton_method(:bytes) do |n|
def @object.bytes(n)
"\x00".b * n
end
end
Expand Down

0 comments on commit 4fc244c

Please sign in to comment.