Skip to content

Commit

Permalink
Switched to using require_relative for loading local files (closes #25
Browse files Browse the repository at this point in the history
).
  • Loading branch information
postmodern committed Aug 4, 2024
1 parent cb5c6f6 commit f7d1f28
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions lib/ronin/code/asm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/program'
require 'ronin/code/asm/shellcode'
require 'ronin/code/asm/version'
require_relative 'asm/program'
require_relative 'asm/shellcode'
require_relative 'asm/version'

module Ronin
module Code
Expand Down
4 changes: 2 additions & 2 deletions lib/ronin/code/asm/archs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/archs/x86'
require 'ronin/code/asm/archs/amd64'
require_relative 'archs/x86'
require_relative 'archs/amd64'
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/archs/amd64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/archs/x86'
require_relative 'x86'

module Ronin
module Code
Expand Down
8 changes: 4 additions & 4 deletions lib/ronin/code/asm/archs/x86.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/register'
require_relative '../register'

module Ronin
module Code
Expand Down Expand Up @@ -133,7 +133,7 @@ def register_clear(name)

#
# Generates the instruction to set a register.
#
#
# @param [Symbol] name
# The name of the register.
#
Expand All @@ -146,7 +146,7 @@ def register_set(name,value)

#
# Generates the instruction to save a register.
#
#
# @param [Symbol] name
# The name of the register.
#
Expand All @@ -156,7 +156,7 @@ def register_save(name)

#
# Generates the instruction to restore a register.
#
#
# @param [Symbol] name
# The name of the register.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/instruction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/immediate_operand'
require_relative 'immediate_operand'

module Ronin
module Code
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/memory_operand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/register'
require_relative 'register'

module Ronin
module Code
Expand Down
6 changes: 3 additions & 3 deletions lib/ronin/code/asm/os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/os/os'
require 'ronin/code/asm/os/freebsd'
require 'ronin/code/asm/os/linux'
require_relative 'os/os'
require_relative 'os/freebsd'
require_relative 'os/linux'

module Ronin
module Code
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/os/freebsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/config'
require_relative '../config'

module Ronin
module Code
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/os/linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/config'
require_relative '../config'

module Ronin
module Code
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/os/os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/config'
require_relative '../config'

require 'yaml'

Expand Down
14 changes: 7 additions & 7 deletions lib/ronin/code/asm/program.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/archs'
require 'ronin/code/asm/os'
require 'ronin/code/asm/register'
require 'ronin/code/asm/instruction'
require 'ronin/code/asm/immediate_operand'
require 'ronin/code/asm/syntax'
require_relative 'archs'
require_relative 'os'
require_relative 'register'
require_relative 'instruction'
require_relative 'immediate_operand'
require_relative 'syntax'

require 'tempfile'
require 'yasm/program'
Expand Down Expand Up @@ -198,7 +198,7 @@ def instruction(name,*operands)
#
# Creates an operand of size 1 (byte).
#
# @param [MemoryOperand, Integer] op
# @param [MemoryOperand, Integer] op
# The value of the operand.
#
# @return [MemoryOperand, ImmediateOperand]
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/code/asm/register.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with ronin-code-asm. If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/code/asm/memory_operand'
require_relative 'memory_operand'

module Ronin
module Code
Expand Down

0 comments on commit f7d1f28

Please sign in to comment.