Skip to content

Commit

Permalink
Added the Memory#mem? method (closes #83).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Feb 26, 2025
1 parent 22a8f42 commit 01ed1b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ronin/asm/memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def initialize(base: nil, displacement: 0, index: nil, scale: 1, width: nil)
#
# @since 1.0.0
#
def mem? = false
def mem? = true

#
# Adds to the displacement of the Memory Operand.
Expand Down
6 changes: 6 additions & 0 deletions spec/memory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@
end
end

describe "#mem?" do
it "must return true by default" do
expect(subject.mem?).to be(true)
end
end

describe "#+" do
let(:operand) do
described_class.new(
Expand Down

0 comments on commit 01ed1b2

Please sign in to comment.