Class: Internal::ByteDecoder::Expression::ToRegexp
- Inherits:
-
Internal::ByteDecoder::Expression
- Object
- Internal::ByteDecoder::Expression
- Internal::ByteDecoder::Expression::ToRegexp
- Defined in:
- lib/decompiler/vm/bytedecoder.rb
Instance Attribute Summary
Attributes inherited from Internal::ByteDecoder::Expression
Instance Method Summary collapse
-
#initialize(pc, value) ⇒ ToRegexp
constructor
A new instance of ToRegexp.
- #precedence ⇒ Object
- #to_s ⇒ Object
Methods inherited from Internal::ByteDecoder::Expression
Constructor Details
#initialize(pc, value) ⇒ ToRegexp
Returns a new instance of ToRegexp.
409 410 411 412 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 409 def initialize(pc, value) super(pc) @value = value end |
Instance Method Details
#precedence ⇒ Object
425 426 427 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 425 def precedence return 1 end |
#to_s ⇒ Object
414 415 416 417 418 419 420 421 422 423 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 414 def to_s case @value when ConcatStrings string = @value.to_s unstring = string[1..-2] return Regexp.compile(unstring).inspect else return Regexp.compile(@value.to_s).inspect end end |