Skip to content

Commit 47f1c3b

Browse files
committed
String#== is always defined
Some FactoryGirl's classes return non-string object from #to_s and those objects can not compare themselves with strings :(
1 parent 7ce8972 commit 47f1c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby-debug-ide/commands/variables.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def execute
129129
locals = @state.context.frame_locals(@state.frame_pos)
130130
_self = @state.context.frame_self(@state.frame_pos)
131131
begin
132-
locals['self'] = _self unless _self.to_s == "main"
132+
locals['self'] = _self unless "main" == _self.to_s
133133
rescue => ex
134134
locals['self'] = "<Cannot evaluate self>"
135135
$stderr << "Cannot evaluate self\n#{ex.class.name}: #{ex.message}\n #{ex.backtrace.join("\n ")}"

0 commit comments

Comments
 (0)