From: Ben Walton <bwalton@artsci.utoronto.ca>
To: sup-talk@rubyforge.org
Cc: Ben Walton <bwalton@artsci.utoronto.ca>
Subject: [sup-talk] [PATCH] Small bug fix in keymap run_hook method
Date: Tue, 2 Mar 2010 13:58:15 -0500 [thread overview]
Message-ID: <1267556295-6401-1-git-send-email-bwalton@artsci.utoronto.ca> (raw)
In-Reply-To: <1267555747-6064-1-git-send-email-bwalton@artsci.utoronto.ca>
Splat the array that is returned from Modes.keymaps.map when it is
passed into Hash[] to avoid an error about an odd number of parameters
being passes to the method.
Error was:
./sup/keymap.rb:129:in `[]': odd number of arguments for Hash
(ArgumentError)
from ./sup/keymap.rb:129:in `run_hook'
from ../bin/sup:98
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
This time with correct spelling in commit message. :)
lib/sup/keymap.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb
index 93060b8..8d54924 100644
--- a/lib/sup/keymap.rb
+++ b/lib/sup/keymap.rb
@@ -126,7 +126,7 @@ EOS
end
def self.run_hook global_keymap
- modes = Hash[Mode.keymaps.map { |klass,keymap| [Mode.make_name(klass.name),klass] }]
+ modes = Hash[*Mode.keymaps.map { |klass,keymap| [Mode.make_name(klass.name),klass] }]
locals = {
:modes => modes,
:global_keymap => global_keymap,
--
1.7.0
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
prev parent reply other threads:[~2010-03-02 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 18:49 [sup-talk] [PATCH] Small bugfix in keymap run_hook Ben Walton
2010-03-02 18:49 ` [sup-talk] [PATCH] Small bug ifx in keymap run_hook method Ben Walton
2010-03-02 18:58 ` Ben Walton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1267556295-6401-1-git-send-email-bwalton@artsci.utoronto.ca \
--to=bwalton@artsci.utoronto.ca \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox