Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
fixes an issue where 'gets' would throw no such file or directory w…
Browse files Browse the repository at this point in the history
…hen passing a subreddit
  • Loading branch information
mcansh committed Dec 9, 2017
1 parent d5f7584 commit 7440bef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reddit/cli.rb
Expand Up @@ -21,7 +21,7 @@ def menu
while input != "exit"
puts ""
puts "> Enter the number of the post you'd like more info on:"
input = gets.strip.downcase
input = STDIN.gets.chomp.downcase

if input.to_i > 0
show_post(input.to_i-1)
Expand Down Expand Up @@ -71,7 +71,7 @@ def show_post(index)
puts "2. Show hot posts"
puts "3. Exit"
puts ""
input = gets.strip.downcase
input = STDIN.gets.chomp.downcase
if input.to_i == 1
openInBrowser(post[:url])
elsif input.to_i == 2
Expand Down

0 comments on commit 7440bef

Please sign in to comment.