diff options
author | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-02-24 17:22:38 -0300 |
---|---|---|
committer | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-02-24 17:29:43 -0300 |
commit | e8793abb7de9e95354e305c2245b9578b64defb6 (patch) | |
tree | 6bdc61c262053bb4730f6fc766980a02d8d16ba6 /lib/highline | |
parent | a4c20e3efa14587c6bf55f2e98ec5d1d56b014ca (diff) | |
download | highline-e8793abb7de9e95354e305c2245b9578b64defb6.tar.gz |
Use #to_s for question and menu string conversion. Rubinius compatible.
Diffstat (limited to 'lib/highline')
-rw-r--r-- | lib/highline/menu.rb | 2 | ||||
-rwxr-xr-x | lib/highline/question.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/highline/menu.rb b/lib/highline/menu.rb index 636c1e4..44c41b7 100644 --- a/lib/highline/menu.rb +++ b/lib/highline/menu.rb @@ -345,7 +345,7 @@ class HighLine # Allows Menu to behave as a String, just like Question. Returns the # _layout_ to be rendered, which is used by HighLine.say(). # - def to_str( ) + def to_s( ) case @layout when :list '<%= if @header.nil? then '' else "#{@header}:\n" end %>' + diff --git a/lib/highline/question.rb b/lib/highline/question.rb index 10a32dc..fa8445a 100755 --- a/lib/highline/question.rb +++ b/lib/highline/question.rb @@ -441,7 +441,7 @@ class HighLine end # Stringifies the question to be asked. - def to_str( ) + def to_s @question end |