Skip to content

Commit

Permalink
Fixes an issue with the Weather plugin. Ruby 1.8.7 gets different val…
Browse files Browse the repository at this point in the history
…ues than 1.9.2 when using [] on a string.
  • Loading branch information
justinweiss committed Jun 3, 2011
1 parent 4d02045 commit 529cb84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/robut/plugin/weather.rb
Expand Up @@ -10,7 +10,7 @@ class << self


def handle(time, sender_nick, message) def handle(time, sender_nick, message)
# ignore messages that don't end in ? # ignore messages that don't end in ?
return unless message[message.length - 1] == "?" return unless message[message.length - 1, 1] == "?"
message = message[0..message.length - 2] message = message[0..message.length - 2]


words = words(message) words = words(message)
Expand Down Expand Up @@ -112,4 +112,4 @@ def bad_location?(location = "")
weather_data(location).search("forecast_information").empty? weather_data(location).search("forecast_information").empty?
end end


end end
2 changes: 1 addition & 1 deletion test/unit/connection_test.rb
@@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'


class SimplePlugin class SimplePlugin < Robut::Plugin::Base
attr_accessor :run attr_accessor :run


def initialize(*args) def initialize(*args)
Expand Down

0 comments on commit 529cb84

Please sign in to comment.