Permalink
Browse files

Fixes an issue with the Weather plugin. Ruby 1.8.7 gets different val…

…ues than 1.9.2 when using [] on a string.
  • Loading branch information...
1 parent 4d02045 commit 529cb84760bdad5a42c4f4592a42ad897b9aaa7a @justinweiss justinweiss committed Jun 3, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/robut/plugin/weather.rb
  2. +1 −1 test/unit/connection_test.rb
@@ -10,7 +10,7 @@ class << self
def handle(time, sender_nick, message)
# 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]
words = words(message)
@@ -112,4 +112,4 @@ def bad_location?(location = "")
weather_data(location).search("forecast_information").empty?
end
-end
+end
@@ -1,6 +1,6 @@
require 'test_helper'
-class SimplePlugin
+class SimplePlugin < Robut::Plugin::Base
attr_accessor :run
def initialize(*args)

0 comments on commit 529cb84

Please sign in to comment.