-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"returns with nonliteral" expectations not working #295
Comments
So, the problem here is with ruby's implicit return. The following code: module Inodoro
def self.cafeina_en_sangre
@cafeina_en_sangre
end
end Produces this ast: Object "Inodoro" (Method "cafeina_en_sangre" [] (Reference "@cafeina_en_sangre")) Expectation module Inodoro
def self.cafeina_en_sangre
return @cafeina_en_sangre
end
end But it's not what one would normally do in ruby. We mulled over the idea of implicitly adding a This isn't an easy solve, so we'll be leaving it for the future. |
Crystal clear. Thanks! |
I tried to use an expectation which case was exactly like this one:
Here you can try it with this solution:
The text was updated successfully, but these errors were encountered: