File: 0001-Remove-Hash-element-order-dependency.patch

package info (click to toggle)
ruby-httpclient 2.3.3-3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 852 kB
  • ctags: 1,120
  • sloc: ruby: 7,230; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 887 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 5f4a3433dbd8a9d3e7737ec4adb8095d61f1c961 Mon Sep 17 00:00:00 2001
From: Hiroshi Nakamura <nahi@ruby-lang.org>
Date: Wed, 14 Dec 2011 15:41:46 +0900
Subject: [PATCH] Remove Hash element order dependency

For 1.8.7 and Rubinius.
---
 test/helper.rb            |    4 +++
 test/test_http-access2.rb |   35 ++++++++++++---------
 test/test_httpclient.rb   |   76 +++++++++++++++++++++++++++------------------
 3 files changed, 70 insertions(+), 45 deletions(-)

Index: ruby-httpclient/test/helper.rb
===================================================================
--- ruby-httpclient.orig/test/helper.rb	2013-06-10 15:33:15.000000000 -0500
+++ ruby-httpclient/test/helper.rb	2013-06-10 15:33:15.000000000 -0500
@@ -126,4 +126,8 @@
     ENV.clear
     ENV.update(env)
   end
+
+  def params(str)
+    HTTP::Message.parse(str).inject({}) { |r, (k, v)| r[k] = v.first; r }
+  end
 end