2015/03/13 修正しました。
require 'rubygems'
require 'json'
print "プロダクトID?:"
project = gets.chomp
print "トラッカーID?:"
tracker = gets.chomp
print "タイトル?:"
subject = gets.chomp
print "内容?:"
desc = gets.chomp
#ハッシュ
issue = {}
issue[:project_id] = project
issue[:tracker_id] = tracker
issue[:subject] = subject
issue[:description] = desc
data = { :issue => issue }
puts data.class
puts "================================================================="
p data
puts "================================================================="
#配列
issue = []
project_id = project
tracker_id = tracker
subject = subject
description = desc
issue << {"projcect_id" => project_id , "tracker_id" => tracker_id , "subject" => subject , "description" => description}
puts issue.class
puts "================================================================="
p issue
puts "================================================================="
#おまけ JSON
puts "おまけJSON"
puts data.to_json
puts
puts issue.to_json
$ ruby hash.rb
プロダクトID?:1
トラッカーID?:4
タイトル?:hogehoge
内容?:mogemoge
Hash
=================================================================
{:issue=>{:project_id=>"1", :tracker_id=>"4", :subject=>"hogehoge", :description=>"mogemoge"}}
=================================================================
Array
=================================================================
[{"projcect_id"=>"1", "tracker_id"=>"4", "subject"=>"hogehoge", "description"=>"mogemoge"}]
=================================================================
おまけJSON
{"issue":{"project_id":"1","tracker_id":"4","subject":"hogehoge","description":"mogemoge"}}
[{"projcect_id":"1","tracker_id":"4","subject":"hogehoge","description":"mogemoge"}]
気をつけよう(´ω`)‥トホー